I have select
with existing options
, I need to bind values from select to my model.
What I do:
<select ng-model="site.id">
<option value="1">First<option>
<option value="2">Second<option>
</select>
Where my model is: user = ['name':'andry', 'site': {'id': 1, name: 'First'}]
I want to bind this select with my model. How is it possible? Currently after choosing value from select site id will be updated, but site name - not.
I'm newbie in angular.