Javatpoint Logo
Javatpoint Logo

AngularJS ng-class-odd Directive

The AngularJS ng-class-odd directive works exactly same as ng-class, but it is used together with ng-repeat and take effect only on odd rows. The ng-class-odd directive is always used within the scope of ng-repeat directive.

It is supported by all HTML elements.

Syntax:

Parameter explanation:

expression: It specifies an expression that returns one or more class names.

Let's take an example to demonstrate ng-class-odd directive.

See this example:

Test it Now



Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA