[英]Angular 1.4.7 ng-if syntax issue
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. 这是在模板视图html文件中。
插值指令{{}}
在ng-if/ng-show
不起作用,您应该直接提供要评估的表达式。
<div ng-if="ipacmIpArray[$index] !== '0.0.0.0'">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.