EVOLUTION-MANAGER
Edit File: ngClassOdd.html
<a href='https://github.com/angular/angular.js/edit/v1.3.x/src/ng/directive/ngClass.js?message=docs(ngClassOdd)%3A%20describe%20your%20change...#L263' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit"> </i>Improve this Doc</a> <a href='https://github.com/angular/angular.js/tree/v1.3.9/src/ng/directive/ngClass.js#L263' class='view-source pull-right btn btn-primary'> <i class="glyphicon glyphicon-zoom-in"> </i>View Source </a> <header class="api-profile-header"> <h1 class="api-profile-header-heading">ngClassOdd</h1> <ol class="api-profile-header-structure naked-list step-list"> <li> - directive in module <a href="api/ng">ng</a> </li> </ol> </header> <div class="api-profile-description"> <p>The <code>ngClassOdd</code> and <code>ngClassEven</code> directives work exactly as <a href="api/ng/directive/ngClass">ngClass</a>, except they work in conjunction with <code>ngRepeat</code> and take effect only on odd (even) rows.</p> <p>This directive can be applied only within the scope of an <a href="api/ng/directive/ngRepeat">ngRepeat</a>.</p> </div> <div> <h2>Directive Info</h2> <ul> <li>This directive executes at priority level 0.</li> </ul> <h2 id="usage">Usage</h2> <div class="usage"> <ul> <li>as attribute: <pre><code><ANY ng-class-odd=""> ... </ANY></code></pre> </li> <li>as CSS class: <pre><code><ANY class="ng-class-odd: ;"> ... </ANY></code></pre> </li> </div> <section class="api-section"> <h3>Arguments</h3> <table class="variables-matrix input-arguments"> <thead> <tr> <th>Param</th> <th>Type</th> <th>Details</th> </tr> </thead> <tbody> <tr> <td> ngClassOdd </td> <td> <a href="" class="label type-hint type-hint-expression">expression</a> </td> <td> <p><a href="guide/expression">Expression</a> to eval. The result of the evaluation can be a string representing space delimited class names or an array.</p> </td> </tr> </tbody> </table> </section> <h2 id="example">Example</h2><p> <div> <a ng-click="openPlunkr('examples/example-example64')" class="btn pull-right"> <i class="glyphicon glyphicon-edit"> </i> Edit in Plunker</a> <div class="runnable-example" path="examples/example-example64"> <div class="runnable-example-file" name="index.html" language="html" type="html"> <pre><code><ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']"> <li ng-repeat="name in names"> <span ng-class-odd="'odd'" ng-class-even="'even'"> {{name}} </span> </li> </ol></code></pre> </div> <div class="runnable-example-file" name="style.css" language="css" type="css"> <pre><code>.odd { color: red; } .even { color: blue; }</code></pre> </div> <div class="runnable-example-file" name="protractor.js" type="protractor" language="js"> <pre><code>it('should check ng-class-odd and ng-class-even', function() { expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')). toMatch(/odd/); expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')). toMatch(/even/); });</code></pre> </div> <iframe class="runnable-example-frame" src="examples/example-example64/index.html" name="example-example64"></iframe> </div> </div> </p> </div>