ng-option:
或使用<select ng-model="blah" ng-options="key as value for (key , value) in data"></select>
ng-repeat:
控制器中的数据:<select> <option ng-repeat="(key, value) in data" value="{{key}}">{{value}}</option></select>
$scope.data = { "key1": "val1", "key2": "val2", "key3": "val3", ...};
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)