Reputation: 6675
Is the following syntax valid in Handlebars.js?
{{#if !results}}
<h1>There are no results</h1>
{{/if}}
The h1 should be displayed only if there are no results.
Upvotes: 0
Views: 873
Reputation: 18051
You should use the unless
helper:
{{#unless results}}
<h1>There are no results</h1>
{{/unless}}
Upvotes: 2