请问是否可以在一个选择选项元素中创建多个 ng-repeat?
例如,
<select ng-repeat="thing in things, item in items"></select>
最佳答案
不,不是。在 Controller 级别连接两个列表并迭代一个列表。
$scope.things = [1,2,3];
$scope.items ["item", "item2"];
$scope.combined = $scope.things.concat($scope.items);
关于javascript - 一个选择元素中的多个 ng-repeat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37329050/