Angular: Empty Fiddle

http://angularjs.org/

HTML

<div ng-controller="MyCtrl">
  <table>
    <tr ng-repeat="item in items track by $index" ng-class="{class1 : $index%4==0, class2 : $index%4==1, class3 : $index%4==2, class4 : $index%4==3}">
        <td>{{item}}</td>
    </tr>
  </table>
</div>

CSS

.class1 {
    background-color : teal;
}

.class2 {
    background-color : grey;
}

.class3 {
    background-color : red;
}

.class4 {
    background-color : yellow;
}

JavaScript

var myApp = angular.module('myApp',[]);


function MyCtrl($scope) {
    $scope.items = ['hello', 'world', 'again', 'hi', 'hello', 'world', 'again', 'hi'];
}