So I have a fairly complex angular table, and I have the repeating portion all good to go, but when I set a variable with ng-class-even
and ng-class-odd
, the variable doesn't seem to persist. Maybe I'm misunderstanding the scope of the ng-repeat
, but I'm stumped.
My repeat looks something like:
<tr ng-repeat-start="item in data.group" ng-class-even="color='red'" ng-class-odd="color='blue'">
<td>{{item.name}}</td>
<tr ng-repeat-end ng-repeat="inner in item.innerdata" ng-class="color">
<td>{{inner.innername}}</td>
</tr>
</tr>
So, I expect color to be set while the rows loop. Here's a Fiddle with the sample setup.