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 $middle and $last incorrect when object contains $$hashKey #1789

Closed
@jussik

Description

@jussik

If you use ng-repeat on an object with a $$hashKey, like inside another ng-repeat, the $$hashKey is included in the object size even though it's not displayed in the DOM. This causes $middle and $last to be calculated like there is one more repetition, so the last element is still $middle and $last is never true.

jsFiddle: http://jsfiddle.net/PhkNK/
Plunker: http://plnkr.co/edit/eaFPleVozysvskk1QlhT

Should be (first, middle, last) like in the first block, not (first, middle, middle) like the last two.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions