Hi people,

I have a select with ng-options like below:

<select ng-model="vm.Product.UnitId" ng-options="item.Key for item in 
vm.Units track by item.Value">

My source comes from an array of Key/Values. Each item is a object:

{
   Key: "My option text",
   Value: "1"
}

So, my final model render as:

{
   Id: 0,
   Name: 'Product Name',
   UnitId: { object }   -> *my problem goes here, I need this property 
flat, only with the selected value in the dropdown, not as object.*
}


How to achieve this?







-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to