我使用angular.js和bootstarp - 角-UI-bootstarp。 我发现了一个问题,即使用选择,甚至选项时不为空,在页面中选择总是显示什么,直到你点击选项列表。 我想的第一件事就是直接把选项中选择,并与NG-选择=“选择”一个选择,但没有工作
<select class=" input-sm pull-right" style="margin-right: 5px;" ng-change="selectUserFilter()" ng-model="user_filter_key" >
<option >All</option>
<option ng-selected="selected">Active</option>
</select>
我尝试的第二件事是嵌入选项列表模式进入选择,仍然没有工作
$scope.user_options = ['All','Active'];
<select class=" input-sm pull-right" style="margin-right: 5px;" ng-change="selectUserFilter()" ng-model="user_filter_key" ng-options="opt for opt in user_options">
</select>