我使用class =" selectpicker-p" 使用此类时,下拉列表不会重置
视图:
<div class="form-group dropdown-full-width">
<label class="control-label col-sm-2" for="fullname">Emrgency:</label>
<div class="col-sm-3">
<select ng-model="urgency" ng-init="urgency='regular'" class="selectpicker-p" >
<option ng-repeat="urgencyItem in urgencyArray" ng-init="urgency='regular'" value="{{urgencyItem.value}}" >{{urgencyItem.value}}</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-3">
<button type="submit" class="btn btn-default" ng-click="asad()">save</button>
</div>
</div>
控制器:
$scope.asad=function(){
$scope.urgency='Regular'
}
如果我使用class =&#34; selectpicker-p&#34;在选择元素上,下拉列表不会重置, 否则,如果我删除它,下拉列表将重置并获得默认值
提前感谢您的帮助!