我想使用 angularJS 中选项的自定义值重置 select 中的选定选项:
HTML
<select id="" name="" class="form-control" ng-model="mymodel">
<option value="1000">All</option>
<option value="-1">Not Done Yet</option>
<option value="0">Already Done</option>
<option value="1">Other option1</option>
<option value="2">Other option1</option>
</select>
选择选项是:<span>{{mymodel}}</span>
<button class="btn btn-danger glyphicon glyphicon-refresh"
data-toggle="tooltip" title="Reset"
ng-click="clearSearch();">Reset</button>
JS
$scope.clearSearch = function () {
$scope.mymodel = 1000;
}