本文介绍了如何在Ember Handlebars中不使用if语句来实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这样的陈述:
{{#if IsValid}}
我想知道如何使用if语句而不是这样:
I want to know that how can I use if statement with not like that:
{{#if not IsValid}}
推荐答案
简单的问题答案:
Simple answers for simple questions:
{{#unless isValid}}
{{/unless}}
请记住,您可以插入 {{其他}}
位于 {{#if}}
或 {{#除非}} $ c $之间c>和结束标记。
Also keep in mind that you can insert an {{else}}
in between an {{#if}}
or {{#unless}}
and the closing tag.
这篇关于如何在Ember Handlebars中不使用if语句来实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!