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 track by $index side effect (BUG) #7119

@Grigorius

Description

@Grigorius

When using ng-repeat with track by $index option I can not delete correct element from array or object (ng-repeat will always remove the last element).

plunkr: http://plnkr.co/edit/mnw4DL7D8wn1hP7ThSD4?p=preview
(the plunkr is a bit complicated, because I did not know what was causing this issue at first, clicking on green or blue square should remove it but it removes the last square - the yellow one instead!)

Using track by $id(item) works correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions