$scope.users = [ {name:'a',id:'1'}, {name:'b',id:'2'}, {name:'c',id:'3'} ]; $scope.selected='2';//id的值,区分类型 $scope.selected=$scope.users[0].id;//如果想要第一个值
本文共 241 字,大约阅读时间需要 1 分钟。
$scope.users = [ {name:'a',id:'1'}, {name:'b',id:'2'}, {name:'c',id:'3'} ]; $scope.selected='2';//id的值,区分类型 $scope.selected=$scope.users[0].id;//如果想要第一个值
转载于:https://www.cnblogs.com/cynthia-wuqian/p/7065582.html