You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an {{#if}} ... {{else}} ... {{/if}} block the else block makes the context one level deeper whereas the if block does not. I have encountered this inside an each, but I'm not sure whether it is also a problem at the top level. My preference is that neither deepens the context, but either way it would be better if they were consistent.
E.g.
Given this context:
varctx={items: [{someValue: true,// or false}],successMessage: 'It works',failureMessage: 'It fails'};
I must use this handlebars markup to render the failure message:
{{#each items}}
{{#if someValue}}
<h1>{{../successMessage}}</h1>
{{else}}
{{! need to go up another level to get to the root }}
<h1>{{../../failureMessage}}</h1>
{{/if}
{{/each}}
The text was updated successfully, but these errors were encountered:
When using an
{{#if}} ... {{else}} ... {{/if}}
block the else block makes the context one level deeper whereas the if block does not. I have encountered this inside an each, but I'm not sure whether it is also a problem at the top level. My preference is that neither deepens the context, but either way it would be better if they were consistent.E.g.
Given this context:
I must use this handlebars markup to render the failure message:
The text was updated successfully, but these errors were encountered: