Amara AngularJS ng-class-odd
Tafarki da amfani
ng-class-odd
Amara ce ga'a gudanar da a dace kuma da kuma dace a kowane abin HTML tare da kuma yin amfani da kuma amfani da CSS, amma a kowane abin HTML a kowane wuri (tsaki) yana aiki ne kawai.
ng-class-odd
Amara ce ga a hukuma ng-repeat
directive is only effective when used together.
ng-class-odd
The directive is very suitable for setting styles for items in a list or rows in a table, but it can be used for any HTML element.
Example
Set class="striped" for every other row (odd rows) in the table row:
<table ng-controller="myCtrl"> <tr ng-repeat="x in records" ng-class-odd="'striped'"> <td>{{x.Name}}</td> <td>{{x.Country}}</td> </tr> </table>
Syntax
<element ng-class-odd="expression</element>
All HTML elements support.
Parameter
Parameter | Description |
---|---|
expression | Return an expression for one or more class names. |