Skip to content
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.

ngOptions mutilating ordering of values in array #9465

Closed
@kumarharsh

Description

@kumarharsh

If I have an array with 11 or more items, and I write this piece of code:

var years = [
"001",
"002",
...
"011"
];
  <select ng-model="model" ng-options="key as year for (key, year) in years"></select>

Then the order in the options is this:

[
001,
002,
011,
003
...
]

relevant jsfiddle: http://jsfiddle.net/97h62/44/

screen shot 2014-10-07 at 21 03 37

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions