0
例如,我有这样的:如何有条件地应用基于属性的ng-disabled?
<button ng-disabled="profile.isLoading || profile.isEmpty" ng-click="profile.saveProfile()"></button>
我想根据我的个人资料指令,需要一个cookie的值的新属性有条件地适用profile.isEmpty,说profile.isNewProfile。起初我以为我可以利用三元运算符,如
<button ng-disabled="profile.isLoading || (profile.isNewProfile ? "" : "profile.isEmpty"">
但这似乎只适用于类。有什么想法吗?
感谢您的回答。看来我似乎只需要删除引号。 – Ruth