<select class="label-select" ng-model="interest" ng-options="interest.id as interest.name for interest in interestes" ng-change="reloadData()"></select>
controller里面这样写的
$scope.interestes=[{
id:'0',
name:'通用兴趣'
},{
id:'1',
name:'通用兴趣1'
},{
id:'2',
name:'通用兴趣2'
},{
id:'3',
name:'通用兴趣3'
},{
id:'4',
name:'通用兴趣4'
},{
id:'5',
name:'通用兴趣5'
}]
$scope.interest=$scope.interestes[0].id;
我想通过id把name拿到
直接写
然后用 $scope.interest.name 去获取name不就是了