Remove Automatic ordering from ng-repeat

angularjs, angularjs-ng-repeat

Solution

As suggested, it's not possible to sort object keys. Buy you can sort over an array created using those object keys -

$scope.keys = Object.keys($scope.myData);
<ul>
  <li ng-repeat="key in keys">
    {{key}} - 
    {{myData[key]}}
  </li>
</ul>

Problem

I have a json object. It is not ordered in ascending order. ``` $scope.myData = { "MAX" : "some value", "Forms" : "some value", "Grids And Tables" : "some value", "Navigation" : "some value", "Services & APIs" : "some value" } ``` I used ng-repeat for showing it in my html template. I got the result but, the order has changed in to ascending order. ``` Forms Grids And Tables MAX Navigation Services & APIs ``` How to prevent angular js from automatic ordering? Check this link

Original source