Angular: Empty Fiddle
http://angularjs.org/
HTML
<div ng-controller="MyCtrl">
Hello, {{name}}!
<div ng-repeat="item in realName" ng-init="rowStyle=0" ng-style='{"background-color": ((item.id)%2==0?"white":"#F0F0F0")}' style="cursor:pointer" >
{{item.id}}
{{item.name}}
</div>
</div>
JavaScript
var myApp = angular.module('myApp',[]);
//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});
function MyCtrl($scope) {
$scope.name = 'Superhero';
$scope.realName=[{"id":1,"name":"A"},{"id":2,"name":"B"},{"id":3,"name":"c"},{"id":4,"name":"D"},{"id":5,"name":"E"},{"id":6,"name":"F"}];
}