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

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

Closed

Description

@godmar

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.

Activity

  1. pkozlowski-opensource commented on Nov 27, 2012

    @pkozlowski-opensource
    Member

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

  2. dkingsbury commented on Jul 31, 2013

    @dkingsbury

    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/

  3. IgorMinar commented on Jan 5, 2014

    @IgorMinar
    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions