angularjs - Offset index by 1 in ng-options -


i have selection dropdown populated object this:

<select class="form-control" ng-model="nonexistantmodel" ng-options="idx idx+1 + order (idx, order) in amazon.orders">

i'm trying array indices show starting 1. (0,1,2,3 become 1,2,3,4)

but of course idx+1 ends joining string , ends 01, 11, 21, 31

i've tried applying number filter no avail:

(idx+1 | number: 0) or (idx | number: 0) + 1 or (idx | number: 0) + (1 | number: 0)

but seem join strings same result.

is there way accomplish this?

simply change idx+1 idx*1+1 or idx/1+1 or idx-0+1.

see live example.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -