Inline partials are not working
See original GitHub issueI am trying to use inline partials:
{{ #*inline "address" }}
{{ fullName }}
{{ #if company }}
{{ company }}
{{ /if }}
{{ address1 }}
{{ #if address2 }}
{{ address2 }}
{{ /if }}
{{ city }},
{{ #if province }}
{{ province }},
{{ /if }}
{{ country }}
{{ postalCode }}
{{ phone }}
{{ /inline }}
Then:
{{ #with order.billingAddress }}
{{ #> address }}
{{ /with }}
However, I am getting the following error:
Template references a helper that is not registered. Could not find helper '#*inline'
You can find documentation for inline partials in Handlebar.js documentation.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Doesn't work with inline partials · Issue #106
It seems to be working if I invoke the inline partial as a partial block. src/templates/partials/wrapper.hbs. <h2> {{#> MyInlinePartial }} {{!-- ...
Read more >Partials
Partials are normal Handlebars templates that may be called ... Subexpressions do not resolve variables so whichPartial must be a function.
Read more >Handlebars dynamic inline partial - javascript
The template function has no way of knowing what the object's name was: template(inputData){ // This function wouldn't know that inputData.
Read more >Mysterious problem with nested (inline) partials - #4 by bep
I built one prototype based on blocks but had to abandon that approach as it did not allow overriding blocks from the Child...
Read more >Using Inline Partials and Decorators with Handlebars 4.0
Inline Partials are defined inside your templates, in Handlebars syntax. There is no JavaScript required to register them. You just declare a ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
#221 adds support to inline partials.
Can we close this issue?