Hanyar AngularJS ng-class-even

Tatwa da Amfani

ng-class-even Amma daa ce amfani da samfur CSS da yana iya haɗa zuwa wani ko watanni samfur HTML, amma kawai a lokacin da samfur HTML ke kaiwa mutum ɗaya a kowace ɗaya (dumi), yana iya aiki aiki.

ng-class-even Amma naa daa ce garga kama ta hanyar da ng-repeat is effective only when used together.

ng-class-even Directives are very suitable for setting styles for items in a list or rows in a table, but they can be used for any HTML element.

Example

Set class="striped" for every other row (even rows) of the table row:

<table ng-controller="myCtrl">
<tr ng-repeat="x in records" ng-class-even="'striped'">
    <td>{{x.Name}}</td>
    <td>{{x.Country}}</td>
</tr>
</table>

Try it yourself

Syntax

<element ng-class-even="expression</element>

All HTML elements support.

Parameters

Parameters Description
expression Return an expression for one or more class names.