I created an array with numbers, but in the method sort() not ordering it correctly in ng-repeat.
eg
$scope.order = ['1', '10', '11', '22', '29', '2'];
eg
<li ng-repeat="key in order.sort()">{{key}}</li>
see how ordered
1 10 11 2 22 29
not
1 2 10 11 22 29
[1,10,11,...].Array.sort(); the comment that it is an array of strings however still holds. Sort an array of numbers by providing the simple comparator to sort:[1, 10, 11, 22, 29, 2].sort(function(a,b){return a-b;})