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

ng-repeat fails for object iterations with identical values #1389

Closed
godmar opened this issue Sep 19, 2012 · 3 comments
Closed

ng-repeat fails for object iterations with identical values #1389

godmar opened this issue Sep 19, 2012 · 3 comments

Comments

@godmar
Copy link
Contributor

godmar commented Sep 19, 2012

Noted by Joshua Heiland on the angularjs mailing list. His test case: http://jsfiddle.net/87fjX/
A shorter test case http://jsfiddle.net/68CYt/1/

Problem still persists in HEAD of master branch. From a brief examination, looks like a logic bug in the ng-repeat directive here: https://github.com/angular/angular.js/blob/master/src/ng/directive/ngRepeat.js#L117-135

Notably, you can't assume that you've already seen an element just because the value is the same.

@pkozlowski-opensource
Copy link
Member

It is slightly better with 1.0.3 but not yet there: http://jsfiddle.net/68CYt/3/

@dkingsbury
Copy link

This issue is not in 1.0.7, or 1.1.1, but is present in 1.1.5. When using (key, value), ng-repeat cannot handle identical "value"s.

http://jsfiddle.net/ktDUW/19/

@IgorMinar
Copy link
Contributor

track by solved this issue. if there are still some cases left uncovered please open a new issue and send us a plunker

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

Successfully merging a pull request may close this issue.

4 participants