Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

ng-class-odd/even don't always remove classes when new entry prepended #7256

Closed
Odi1 opened this issue Apr 25, 2014 · 1 comment
Closed

ng-class-odd/even don't always remove classes when new entry prepended #7256

Odi1 opened this issue Apr 25, 2014 · 1 comment

Comments

@Odi1
Copy link

Odi1 commented Apr 25, 2014

The recent changes around ng-class-odd and ng-class-even seem to have introduced a bug. When adding an entry at the top of the underlying data array, the shifted entries get the new class added, but the old class is not removed.

Have a look at the example: http://jsfiddle.net/eXh7J/1/
When pressing the "prepend" button, the first few entries look fine, they have only one class. But from the 4th entry on, each entry has two classes. Both the odd and the even class.

This broke with v1.2.16. It was still working in v1.2.15.

@shahata
Copy link
Contributor

shahata commented Apr 26, 2014

I know why this happens. On it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants