Angular JS ng-class-odd in nested ng-repeats
I'm trying to develop a very generic table outputter - no set number of
rows or columns. As such, I've got nested ng-repeat attributes, as such:
<table>
<tr ng-repeat="row in rowList">
<td ng-repeat="col in colList">{{printCell(row,col)}}</td>
</tr>
</table>
It's working great! Until I try to use ng-class-even and ng-class-odd to
change the background color of the rows accordingly.
If I put the ng-class-*** statements on the td tag, I get alternating
column colors.
If I put the ng-class-*** statements on the tr tag, I don't get any class
assignment - they all stay default.
I want alternating row colors. How do I go about doing this?
EDIT:
Please delete this, someone? It turns out the problem was that my css
classes were specifying that the class were set on a td tag.
No comments:
Post a Comment