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.
ngRepeat iterates over object in alphabetical order #6210
Closed
Description
This is very unexpected, all major browsers retain order of inserted keys and it is not going to change in any way in future as it would break a lot of existing code.
No matter of that, angular does it its own "way".
Basically it makes this feature completely useless as you can't use it for example for iterating computed averages, and similar great things.
This is major flaw in design and fixing it involves removing one line:
collectionKeys.sort();
Can we at least discuss this? I am highly convinced this (possibly) breaking change should affect minimum people and if orderBy worked on objects too, fixing may be very simple on their side.