Questions tagged [angularjs-ng-class-odd]

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

Usage

as attribute:

<ANY
  ng-class-odd="expression">
...
</ANY>

as CSS class:

<ANY class="ng-class-odd: expression;"> ... </ANY>
3 questions
10
votes
3 answers

Implementing ngClassEven ngClassOdd for angular 2

I tried to implement ng-class-even and ng-class-odd ( from angular 1) type behaviour in angular 2 application. I have written the code below and its working fine, I want to know if there is any other way of doing this. HTML
5
votes
3 answers

ngClassOdd/ngClassEven not working as expected

Using Angular version 1.2.15, I found a bug that it seems started on version 1.2.2 until 1.2.15. Plunker Demo to reproduce Html
  1. Dalorzo
    • 19,834
    • 7
    • 55
    • 102
1
vote
1 answer

Angular nested ng-repeat class variable

So I have a fairly complex angular table, and I have the repeating portion all good to go, but when I set a variable with ng-class-even and ng-class-odd, the variable doesn't seem to persist. Maybe I'm misunderstanding the scope of the ng-repeat,…