对ng-repeat的表格内容添加不同样式,html代码:
<tr ng-repeat="x in tableData">
<td>{{x.networkName}}</td>
<td>{{x.network}}</td>
<td ng-style="{background: x.status === -1 ? '#f0ad4e' : x.status === 1?'#5cb85c':x.status === 2?'#f04124':'#a5a5a5'}">{{x.status | status }}</td>
</tr>
实现效果: