This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
ng-repeat $middle and $last incorrect when object contains $$hashKey #1789
Labels
Comments
Confirmed that this also fails on current unstable: v1.1.1. |
petebacondarwin
added a commit
to petebacondarwin/angular.js
that referenced
this issue
Jan 11, 2013
…tered out If the $last property is calculated from the original collectionLength on an object and properties starting with $ were filtered out, then $last is never applied and $middle is applied erroniously. This fix uses the length of the filtered array instead. Fixes angular#1789
IgorMinar
pushed a commit
to IgorMinar/angular.js
that referenced
this issue
Jan 17, 2013
If the $last property is calculated from the original collectionLength on an object and properties starting with $ were filtered out, then $last is never applied and $middle is applied erroniously. Fixes angular#1789
IgorMinar
pushed a commit
to IgorMinar/angular.js
that referenced
this issue
Jan 17, 2013
If the $last property is calculated from the original collectionLength on an object and properties starting with $ were filtered out, then $last is never applied and $middle is applied erroniously. Closes angular#1789
IgorMinar
pushed a commit
to IgorMinar/angular.js
that referenced
this issue
Jan 17, 2013
If the $last property is calculated from the original collectionLength on an object and properties starting with $ were filtered out, then $last is never applied and $middle is applied erroniously. Closes angular#1789
jamessharp
pushed a commit
to jamessharp/angular.js
that referenced
this issue
Jan 18, 2013
If the $last property is calculated from the original collectionLength on an object and properties starting with $ were filtered out, then $last is never applied and $middle is applied erroniously. Closes angular#1789
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The text was updated successfully, but these errors were encountered: