W3cubDocs

/Angular.js 1.6

Improve this Doc View Source ngClassEven

  1. directive in module ng

Overview

The ngClassOdd and ngClassEven directives work exactly as ngClass, except they work in conjunction with ngRepeat and take effect only on odd (even) rows.

This directive can be applied only within the scope of an ngRepeat.

Directive Info

  • This directive executes at priority level 0.

Usage

  • as attribute:
    <ANY
      ng-class-even="expression">
    ...
    </ANY>
  • as CSS class:
    <ANY class="ng-class-even: expression;"> ... </ANY>

Arguments

Param Type Details
ngClassEven expression

Expression to eval. The result of the evaluation can be a string representing space delimited class names or an array.

Example

© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.6.8/docs/api/ng/directive/ngClassEven