Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Defining new array
Message
From
17/09/2014 03:39:37
 
General information
Forum:
Javascript
Category:
Other
Miscellaneous
Thread ID:
01607662
Message ID:
01607673
Views:
46
This message has been marked as the solution to the initial question of the thread.
>Hi everybody,
>
>I can define a new array this way:
>
> var itemTreeHeight = [20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80];
>
>However, how can I reference this array in my code? E.g. I try to use
>
>
> <select class="form-control" ng-model="currentSalespoint.dciHeight"
>                        ng-options="s.value as s.value for s in metaData.itemTreeHeight"></select>
>
>and it doesn't work (e.g. I don't see values).
>
>So, I either need to somehow create an array with named items (how) or find a way to reference it.
>
>Thanks a lot in advance.
>
>UPDATE. Never mind, figured this out. I just needed to use {value:20} to define names for the items.

You don't need to do that. Just use :
<select  data-ng-model="currentSalespoint.dciHeight"
                       data-ng-options="s for s in metaData.itemTreeHeight"></select>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform