Jak ustawić wybraną opcję kontrolki listy rozwijanej za pomocą kątowego JS
Używam Angular JS i muszę ustawić wybraną opcję kontrolki listy rozwijanej za pomocą kątowego JS. Wybacz mi, jeśli to śmieszne, ale jestem nowy w Angular JS
Oto lista rozwijana mojego HTML
<select ng-required="item.id==8 && item.quantity > 0" name="posterVariants"
ng-show="item.id==8" ng-model="item.selectedVariant"
ng-change="calculateServicesSubTotal(item)"
ng-options="v.name for v in variants | filter:{type:2}">
</select>
Po wypełnieniu otrzymuję
<select ng-options="v.name for v in variants | filter:{type:2}" ng-change="calculateServicesSubTotal(item)"
ng-model="item.selectedVariant" ng-show="item.id==8" name="posterVariants"
ng-required="item.id==8 && item.quantity > 0" class="ng-pristine ng-valid ng-valid-required">
<option value="?" selected="selected"></option>
<option value="0">set of 6 traits</option>
<option value="1">5 complete sets</option>
</select>
Jak ustawić kontrolę dlavalue="0"
wybrać?