AngularJS ng-class-even instruction
AngularJS examples
Even rows to the table set class = "striped":
<Table ng-controller = "myCtrl ">
<Tr ng-repeat = "x in records" ng-class-even = " 'striped'">
<Td> {{x.Name}} </ td>
<Td> {{x.Country}} </ td>
</ Tr>
</ Table>
<Tr ng-repeat = "x in records" ng-class-even = " 'striped'">
<Td> {{x.Name}} </ td>
<Td> {{x.Country}} </ td>
</ Tr>
</ Table>
try it"
Definition and Usage
ng-class-even instruction is used to bind a dynamic HTML elements or more CSS classes, but only act on the even-numbered lines.
ng-class-even needed instruction and ng-repeatinstruction with use.
ng-class-even in the form of instruction recommended rendering styles, but all HTML elements are supported.
grammar
<Element ng-class-even = "expression"> </ element>
All HTML elements are supported.
Parameter Value
value | description |
---|---|
expression | Expression specify one or more CSS classes. |