I want the odd table rows to be colored. Angular has ng-class-odd and ng-class-even that runs inside the ng-repeat scope.
Is there some way to get the index of the repeat function in Aurelia?
There are properties $even and $odd available for elements in the binding repeat.for .
$even
$odd
repeat.for
You can conditionally apply a class like this -
<ul> <li repeat.for="item of items" class="${ $even ? 'my-class': '' }"></li> </ul>