0
我的問題是ng-if沒有像我假裝的那樣工作,我有一個帶有_name屬性的對象數組,im正在做一個ng-重複,並且裏面我想要區分一些是以特定方式和其他方式命名。基於那個即時通訊使我的ng-if,但打印兩行,它的內容應該是一個或另一個,任何人都可以指出我失敗的地方? tksng-if角度不起作用
在clusterEntity.cluster中的數組下面;
locations:{
location:[
{_name: "staging", _path: ""},
{_name: "temp", _path: ""},
{_name: "working", _path: ""}
]
},
<div ng-repeat="location in clusterEntity.cluster.locations.location">
<div ng-if="
location._name === 'staging' ||
location._name === 'working' ||
location._name === 'temp'">
<something here>
</div>
<div ng-if="
location._name !== 'staging' ||
location._name !== 'working' ||
location._name !== 'temp'">
<something there>
</div>
</div>
很好,謝謝!我已經在指責ng-repeat:/ – 2014-11-06 18:28:41