How to implement not with if statement in Ember Handlebars?

Kapil Garg picture Kapil Garg · May 10, 2012 · Viewed 88.2k times · Source

I have a statement like this:

{{#if IsValid}}

I want to know how I can use a negative if statement that would look like that:

{{#if not IsValid}}

Answer

Christopher Swasey picture Christopher Swasey · May 10, 2012

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.