我有一个简单的ng-repeat,用于显示一组值。在某些输出中,我有几个ng-if来显示/隐藏DIV。
HTML:
<div ng-repeat="details in myDataSet">
<p>{{ details.Name }}</p>
<p>{{ details.DOB }}</p>
<div ng-if="details.Payment[0].Status == '0'">
<p>No payment</p>
</div>
<div ng-if="details.Payment[0].Status == '1' || details.Payment[0].Status == '2'">
<p>Late</p>
</div>
<div ng-if="details.Payment[0].Status == '3' || details.Payment[0].Status == '4' || details.Payment[0].Status == '5'">
<p>Some payment made</p>
</div>
<div ng-if="details.Payment[0].Status == '6'">
<p>Late and further taken out</p>
</div>
<div ng-if="details.Payment[0].Status != '0' || details.Payment[0].Status != '1' || details.Payment[0].Status != '2' || details.Payment[0].Status != '3' || details.Payment[0].Status != '4' || details.Payment[0].Status != '5' || details.Payment[0].Status != '6'">
<p>Error</p>
</div>
<p>{{ details.Gender}}</p>
</div>
我的应用在尝试显示!=
部分时显示错误。