<select ng-model="form.priority" ng-options="priority.id as priority.value for priority in leadPriority"></select>
默认显示空白选项。如何删除它?
答案 0 :(得分:1)
在选项中使用ng-init 例如。
<select ng-model="form.priority" ng-options="priority.id as priority.value for priority in leadPriority" ng-init="form.priority = leadPriority[0].id"></select>
答案 1 :(得分:1)
您可以在控制器中设置为,
$scope.form.priority = $scope.leadPriority[0].id;
答案 2 :(得分:0)