使用ember评估手柄中的两个条件 [英] Evaluate two conditions in handlebar using ember
本文介绍了使用ember评估手柄中的两个条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否可以这样做:
I was wondering if its possible to do something like this:
{{#if ClientController.Client.number && PhoneController.hasLinesToInstall}}
...
{{/if}}}
谢谢,
Juanitos
推荐答案
我不认为可以链接这样的条件 - 在文档中我找不到任何东西。
I don't think it's possible to chain conditions like that in handlebars like that - I can't find anything about it in the documentation.
你可以嵌套它们,如下所示:
You could nest them though, like this:
{{#if ClientController.Client.number}}
{{#if PhoneController.hasLinesToInstall}}
...
{{/if}}
{{/if}}
这将达到相同的结果。
这篇关于使用ember评估手柄中的两个条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文