I'm sorting an array of objects by the name
property which is the same for all items.
However, the array's first 3 items are never the same, it's like they take turns to be first item (haha).
I'm using ngRepeat
to display the array in a table.
Any idea what the issue might be?
Could it be a problem of digest timing vs. sort timing?
Here's a Plnkr, click the top button to see what I mean:
http://plnkr.co/edit/6CXxDEHJksPBLiMrpP3r?p=preview
Console outputs the result of the sort function, and it's always 0
, meaning the compared items have the same value.