【发布时间】:2016-08-10 05:06:25
【问题描述】:
所以我尝试使用三元运算符将 2 个跨度组合为:
<span ng-if="customer != null">{{ customer }}</span><span ng-if="customer == null">[customer]</span>
切换只是基于表单中其他地方的输入中的 id 是否具有值。有什么建议吗?
非常感谢。
【问题讨论】:
-
您在寻找
ng-switch吗?