I have an Angular1.0.7 webapp. I have a select with ng-options element like:
<select bs-select data-width="180px" ng-model="searching.duration" ng-options="duration as duration.name for duration in durations">
<option value="">{{'DURATION' | translate}}</option>
</select>
and duratios is an array of object like:
durations= [{"id":11,"name":"DURATION_1_DAY","value":1},{"id":12,"name":"DURATION_2_DAYS","value":2}, ...]
As you can see in the select, I would like to assign the complete object to the model like: duration= {"id":11,"name":"DURATION_1_DAY","value":1}
when I select different options the model is assigned correctly. However, when the model has a initial value the select is not properly initialized with the right value.