How to implement not with if statement in Ember Handlebars?

后端 未结 6 1677
故里飘歌
故里飘歌 2021-01-30 04:34

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:

6条回答
  •  抹茶落季
    2021-01-30 05:13

    unless block helper (built-in helper)

    unless helper is the inverse of the if helper.

    Its block will be rendered if the expression returns a falsy value.

      {{#unless valid}}
      

    WARNING

    {{/unless}}

提交回复
热议问题