Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get object data from select ng-options
Message
 
 
To
All
General information
Forum:
Javascript
Category:
Other
Title:
Get object data from select ng-options
Miscellaneous
Thread ID:
01627613
Message ID:
01627613
Views:
30
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
Next
Reply
Map
View

Click here to load this message in the networking platform