The ngClassOdd
and ngClassEven
directives work exactly as ngClass, except they work in conjunction with ngRepeat
and take effect only on odd (even) rows.
This directive can be applied only within the scope of an ngRepeat.
<ANY ng-class-odd="expression"> ... </ANY>
<ANY class="ng-class-odd: expression;"> ... </ANY>
Param | Type | Details |
---|---|---|
ngClassOdd | expression | Expression to eval. The result of the evaluation can be a string representing space delimited class names or an array. |
Animation | Occurs |
---|---|
addClass | just before the class is applied to the element |
removeClass | just before the class is removed from the element |
An example on how to implement animations using ngClassOdd
:
© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.7.8/docs/api/ng/directive/ngClassOdd