Why this doesn't work for my angular template view?
<tr class="warning" ng-repeat="aIpacmTableLine in ipacmMacArray">
<td><font color=SteelBlue>{{aIpacmTableLine}}</td>
<td><font color=SteelBlue>
<div ng-if="{{ipacmIpArray[$index]}} !== \"0.0.0.0\"">
<a ng-href="{{ipacmIpArray[$index]}}">
{{ipacmIpArray[$index]}}
</a>
</div>
<div ng-if="{{ipacmIpArray[$index]}} === \"0.0.0.0\"">
{{ipacmIpArray[$index]}}
</div>
</td>
</tr>
While this works
<tr class="warning" ng-repeat="aIpacmTableLine in ipacmMacArray">
<td><font color=SteelBlue>{{aIpacmTableLine}}</td>
<td><font color=SteelBlue>
<div>
<a ng-href="{{ipacmIpArray[$index]}}">
{{ipacmIpArray[$index]}}
</a>
</div>
</td>
</tr>
This is in a template view html file.
插值指令{{}}
在ng-if/ng-show
不起作用,您应该直接提供要评估的表达式。
<div ng-if="ipacmIpArray[$index] !== '0.0.0.0'">
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.