这是一个手动添加不带 ngOptions 选项但仍绑定到我认为与您的问题相关的模型的示例:
http://jsfiddle.net/armyofda12mnkeys/cd6d5vfj/8/
注意:我把空的“--请选择--”和“添加新单元”选项放在中间,看看如何选择它们。默认情况下,当登陆页面时,ng-selected 将“添加新单位”设置为真(我想知道角度是否智能检测到“--请选择--”也可能被选中,因为它的模型是空的,只选择最后一个真选项,知道您不能在常规下拉列表中选择两个选项吗?)。
如果你设置$scope.currentquestion.someOtherParam = false ; 并运行,然后你会得到--请选择--作为默认选择。
然后设置$scope.currentquestion.metric_pref = 'stn'; 并运行,然后您应该将石头设置为默认值。
然后更改另一个选项,您可以看到模型更新。
<div ng-app="myApp">
<div ng-controller="MyCtrl">
<h3>{{currentquestion.text}}</h3>
<select
ng-model="currentquestion.metric_pref"
name="{{currentquestion.qid}}"
id="{{currentquestion.qid}}"
>
<option value="kg">
kg.
</option>
<option value="">
--Please choose--
</option>
<option value="lbs">
pounds
</option>
<option value="add" ng-selected='currentquestion.someOtherParam'>
Add new unit
</option>
<option value="stn">
stones
</option>
</select>
CurrentVal:{{currentquestion.metric_pref}}
</div>
</div>
var myApp = angular.module('myApp', []);
myApp.controller("MyCtrl", function ($scope) {
$scope.currentquestion = {};
$scope.currentquestion.qid = "QS1";
$scope.currentquestion.text = "What unit do you prefer to state your weight in?";
$scope.currentquestion.metric_pref = '';//can put stn in here to default at stones
$scope.currentquestion.someOtherParam = false;
//$scope.currentquestion.unit_options = [ 'lbs' , 'stones' , 'kg' ]; //lbs. for US, stones for UK, metric for others
//not using ng-options to build the value/text of the option as I need to use ng-translate in the code
});