![]() |
VOOZH | about |
The ng-class-even Directive in AngularJS is used to specify the CSS classes on every even appearance of HTML elements. It is used to dynamically bind classes on every even HTML element. If the expression inside the ng-class-even directive returns true then only the class is added else it is not added. The ng-repeat directive is required for the ng-class-even directive to work. It is supported by all HTML elements.
Syntax:
<element ng-class-even="expression"> Contents... </element>
Parameter value:
Example 1: This example uses the ng-class-even Directive to select even elements and apply CSS property.
Output:
Example 2: This example describes the ng-class-even Directive in AngularJS, where even elements are selected, in order to change its font-size & the text color.
Output: