How to implement not with if statement in Ember Handlebars?
You have many ways of doing that.
1. Use {{unless}}
:
{{#unless isValid}}
...
{{else}}
...
{{/unless}}
2. Use inline-if helper:
{{#if (if isValid false true)}}
...
{{else}}
...
{{/if}}
3. Use ember-truth-helpers addon:
{{#if (not isValid)}}
...
{{else}}
...
{{/if}}
Simple answers for simple questions:
{{#unless isValid}}
{{/unless}}
Also keep in mind that you can insert an {{else}}
in between an {{#if}}
or {{#unless}}
and the closing tag.