Here is the problem, I create table with ng-repeat
, in table td I have select with option, I need to set selected option.
<tr id="edit" ng-repeat="x in products">
<td style="width: 2%;display: none;">{{x.id}}</td>
<td style="width: 16%"><h6 style="font-weight: normal;" ng-bind="nameResult" ng-hide="false"></h6>
<select style="margin: -16px 0 0 0;" class="span12" style="margin: 0;" ng-change="loadProductData(x)" id="product_list" ng-options="prod.product_name as prod.product_name for prod in items track by prod.product_id" ng-model="selectedOption">
<option value="">Select product</option>
<option label="Registracija korisni" value="57">Registracija korisni</option>
<option selected="selected" label="Testing of platform" value="58">Testing of platform</option>
<option label="Test 2" value="63">Test 2</option>
<option label="irfam" value="87">irfam</option>
<option label="ddd" value="88">ddd</option>
</select>
</td>
<tr>
So I have multiple select with same ng-model
how to set selected different option for each select.