Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

orderBy $index descending with track by $index not working #12405

Closed
OlsonDev opened this issue Jul 22, 2015 · 0 comments
Closed

orderBy $index descending with track by $index not working #12405

OlsonDev opened this issue Jul 22, 2015 · 0 comments

Comments

@OlsonDev
Copy link

Hi. I came across #8334 but it's slightly different than my use case. I have an array of 0's and 1's I need to list in reverse order. I put together a plunk to demonstrate the issue. In the plunk, I made it an array of 0, 1, 2, & 3 to demonstrate the issue more clearly. Because my array items are not objects I need to use track by $index but I need the array reversed visually so I need an orderBy filter. I'd rather not duplicate the array and reverse it because then that duplication would happen every digest cycle or I'd have to track changes manually. Many others seem content with this solution though. However, even back in 2013, people seemed to think this solution should work. They just didn't file an issue... so I am.

@Narretz Narretz added this to the Backlog milestone Jul 23, 2015
lgalfaso added a commit to lgalfaso/angular.js that referenced this issue Aug 8, 2015
Stable sort the input array

Fixes angular#12405
ggershoni pushed a commit to ggershoni/angular.js that referenced this issue Sep 29, 2015
Stable sort the input array

Closes angular#12408
Fixes angular#12405
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants