【发布时间】:2016-10-10 04:00:47
【问题描述】:
使用 ng-model 和 ng-options 属性我绑定了 select html 标签。 它正确绑定选项中的所有数据,但一个空选项首先与“”绑定。 我想使用 angular 删除这个空选项
<select class="ng-pristine UserGroups selectGroupClass" ng-model='groupList' required ng-options='item.name for item in groupOptions track by item.name'></select>
$scope.groupOptions = [{
name: "What's Hot",
value: 'latest'
}, {
name: 'Trending',
value: 'popular'
}];
【问题讨论】:
-
groupOptions 是什么样子的
标签: angularjs