Improve this Doc View Source ngClassOdd
From Get docs
< Directive components in ngAngularjs/docs/1.8/api/ng/directive/ngclassodd
Improve this Doc View Source ngClassOdd
- directive in module ng
Overview
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.
Directive Info
- This directive executes at priority level 0.
Usage
as attribute:
<ANY ng-class-odd="expression"> ... </ANY>
as CSS class:
<ANY class="ng-class-odd: expression;"> ... </ANY>
Arguments
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. |
Animations
Animation | Occurs |
---|---|
addClass | just before the class is applied to the element |
removeClass | just before the class is removed from the element |
Click here to learn more about the steps involved in the animation.
Examples
An example on how to implement animations using ngClassOdd
:
© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 3.0.
https://code.angularjs.org/1.8.2/docs/api/ng/directive/ngClassOdd