ng-class-odd for odd
Description
We can add style for odd numbered item with ng-class-odd.
Example
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
<style>
.odd {<!-- w ww . ja v a2s. co m-->
color: red;
}
.even {
color: blue;
}
</style>
</head>
<body>
<div ng-app="">
<ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
<li ng-repeat="name in names" ng-class-odd="'odd'" ng-class-even="'even'">
{{name}}
</li>
</ol>
</div>
</body>
</html>