Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Defining new array
Message
 
 
To
All
General information
Forum:
Javascript
Category:
Other
Title:
Defining new array
Miscellaneous
Thread ID:
01607662
Message ID:
01607662
Views:
42
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.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform