WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

AngularJS ng-class-odd Directive


Example

Set class="striped" for each other (odd) 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>
Try it yourself »

Definition and Usage

The ng-class-odd order powerfully ties at least one CSS classes to a HTML component, however will produce results just on each other (odd) appearence of the HTML element.

The ng-class-odd order will possibly work in the event that it is utilized together with the ng-repeat directive.

The ng-class-odd order is ideal for styling things in a rundown or columns in a table, however it very well may be utilized on any HTML element.


Syntax

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

Supported by all HTML elements.


Parameter Values

Value Description
expression An articulation that profits at least one class names.