The ngClassOdd and ngClassEven directives work exactly as ngClass, except they work in conjunction with ngRepeat and take effect only on odd (even) rows.
The directive operates in three different ways, depending on which of three types the expression evaluates to:
If the expression evaluates to a string, the string should be one or more space-delimited class names.
If the expression evaluates to an object, then for each key-value pair of the object with a truthy value the corresponding key is used as a class name.
If the expression evaluates to an array, each element of the array should either be a string as in type 1 or an object as in type 2. This means that you can mix strings and objects together in an array to give you more control over what CSS classes appear. See the code below for an example of this.
The directive won't add duplicate classes if a particular class was already set.
When the expression changes, the previously added classes are removed and only then are the new classes added.
Usage
as attribute:
<ANY
ng-class="expression">
...
</ANY>
as CSS class:
<ANY class="ng-class: expression;"> ... </ANY>