Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get object data from select ng-options
Message
 
 
À
Tous
Information générale
Forum:
Javascript
Catégorie:
Autre
Titre:
Get object data from select ng-options
Divers
Thread ID:
01627613
Message ID:
01627613
Vues:
31
Update. Never mind, have an idea of how to solve it.

Hi everybody,

Part of my directive's template is the following:
<select class="col-md-3 form-control" ng-model="selectedItemId" id="item" name="item"
                ng-disabled="!selectedCategoryId"
               
                ng-options="c.itemId as c.descrip for c in metaData.items | filter: {departmeId:selectedDepartmentId, categoryId:selectedCategoryId}">
            <option value="">@String.Format(Labels.selectX, Labels.item)</option>
        </select>
Now, the metaData.items array also contains department, category, item columns. I want to somehow get them when I select the item from the list.

What should I change here to be able to get to them? I would want to preserve ng-model = "selectedItemId" if possible and perhaps somehow get the info using ngChange event?

Thanks in advance.
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