AngularJS: Empty - latest CI build
HTML
<script src="http://ci.angularjs.org/job/angular.js-angular-master/ws/build/angular.js"></script>
<table>
<tr ng-repeat="row in rows" ng-class-even="'even'" ng-class-odd="odd">
<td>{{row.a}}</td>
<td>{{row.b}}</td>
</tr>
</table>
<table>
<tr ng-repeat="row in rows" ng-class="cls($index)">
<td>{{row.a}}</td>
<td>{{row.b}}</td>
</tr>
</table>
CSS
table {
margin: 20px;
}
td {
border: 1px solid gray;
padding: 5px;
}
.even {
background: #999;
}
JavaScript
function Main($scope) {
$scope.rows = [{a: 'one', b: 'two'}, {a: 'three', b: 'four'}, {a: 'five', b: 'six'}];
$scope.cls = function(idx) {
return idx % 2 === 0 ? 'odd' : 'even';
}
}