【发布时间】:2016-07-28 09:21:05
【问题描述】:
我显示了一个表格,其中包含 count 库尔姆和此 count 具有带有 href 到页面的 <a> 标记。
我想显示所有count > 0 的链接并禁用count=0。
我试过AngularJS - ng-disabled not working for Anchor tag,发现使用ng-disabled是没有用的。
使用ng-class 会有所帮助,但我无法在ng-class 中指定条件。
附:我希望将cursor:not-allowed 写入ng-class 本身。无法更改 CSS
这是我的 HTML 代码
<tr ng-repeat="service in services">
<td>{{$index+1}}</td>
<td>{{service.serviceName}}</td>
<td><a href="#/info/{{service.id}}">{{service.numberOfScenarios}}</a></td>
</tr>
numberOfScenarios 显示 count。
【问题讨论】: