0

I'm using angular and ng-repeat to show an objects key. But the order isn't the same as I wrote it. I would like it to display in order as I wrote it, but its not doing so.

Javascript

$scope.steps= {
        'Select Device': true,
        'Type': false,
        'Model': false,
        'Ig': false
    }

Html

<div class="select" ng-repeat="(key, value) in steps"">
    {{ key }},
</div>

Result

Ig, Model, Select Device, Type

jason
  • 117
  • 1
  • 5
  • 1
    Keys are not guaranteed to be ordered http://stackoverflow.com/questions/5525795/does-javascript-guarantee-object-property-order – Matthew Arkin Jun 18 '15 at 01:03
  • @Brian I created a plunk and it seems to be in correct order: http://plnkr.co/edit/tpl:8rFfZljYNl3z1A4LKSL2?p=preview – kanchirk Jun 18 '15 at 01:04

0 Answers0