Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Defining new array
Message
 
 
À
Tous
Information générale
Forum:
Javascript
Catégorie:
Autre
Titre:
Defining new array
Divers
Thread ID:
01607662
Message ID:
01607662
Vues:
43
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform