AngularJS ng-class-even Instruction
AngularJS Examples
Set class="striped" for the even rows of a table:
<
table
ng-controller=
"myCtrl"
<
tr
ng-repeat="x in records"
ng-class-even=
"'striped'"
<
td
{{x.Name}}
<
/td
<
td
{{x.Country}}
<
/td
<
/tr
<
/tableTry it »
Definition and Usage
ng-class-even The directive dynamically binds one or more CSS classes to HTML elements, but only for even rows.
ng-class-even The directive needs to be used with ng-repeat directive.
ng-class-even The directive is recommended for styling table rows, but all HTML elements are supported.
Syntax
<
element
ng-class-even=
"expression"
<
/elementAll HTML elements are supported.
Parameter value
| Value | Description |
|---|---|
| expression | An expression that specifies one or more CSS classes. |
AngularJS Reference Manual