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

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.

Activity

  1. petebacondarwin commented on Jan 11, 2013

    @petebacondarwin
    Contributor

    Confirmed that this also fails on current unstable: v1.1.1.
    http://plnkr.co/edit/rUR5uC52iJ7zS3P8AwOQ?p=preview

  2. added a commit that references this issue on Jan 11, 2013
    ebb325a
  3. added 2 commits that reference this issue on Jan 17, 2013
    9c6d22c
    17fcb3d
  4. added a commit that references this issue on Jan 17, 2013
    ed2fd2d
  5. added a commit that references this issue on Jan 18, 2013
    768a682
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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