我指的是这个笨蛋:http://plnkr.co/edit/X4SqsjGtlDOJQrkrYWv6?p=preview 如果pedido是“ A001”,我想将行的颜色设置为绿色。 我应该怎么做? 我尝试更改** ng类,但似乎不起作用,因为它是“ A001”
请让我知道是否需要更改其他内容
var rowTemplate = `
<div style="height: 100%"
ng-class="{red: row.getProperty('\pedido\') == C003,
green: row.getProperty('\pedido\') == A001}">
<div ng-style="{'cursor': row.cursor }"
ng-repeat="col in renderedColumns"
ng-class="col.colIndex()" class="ngCell ">
<div class="ngVerticalBar" ng-style="{height: rowHeight}"
ng-class="{ ngVerticalBarVisible: !$last }">
</div>
<div ng-cell>
</div>
</div>
</div>
`;
答案 0 :(得分:0)
总是设置class = A001 您应该将=更改为==
green: row.getProperty(\'pedido\') = A001
更改为
green: row.getProperty(\'pedido\') == \'A001\'