【发布时间】:2014-11-20 15:00:57
【问题描述】:
如何检查范围变量是否未定义?
这不起作用:
<p ng-show="foo == undefined">Show this if $scope.foo == undefined</p>
【问题讨论】:
-
欢迎来到 StackOverflow!请参阅"Should questions include “tags” in their titles?",其中的共识是“不,他们不应该”。
-
啊,我没想到您无法访问模板标记中的“typeof”关键字。对于那个很抱歉。我已经删除了我的近距离投票。
标签: angularjs angularjs-ng-show