angular.js
angular.js copied to clipboard
ng-repeat $middle and $last incorrect when object contains $$hashKey
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.
Confirmed that this also fails on current unstable: v1.1.1. http://plnkr.co/edit/rUR5uC52iJ7zS3P8AwOQ?p=preview