在一个选择元素中进行多次ng重复

时间:2016-05-19 16:26:19

标签: javascript jquery angularjs ionic-framework

我可以知道是否可以在一个选择选项元素中创建多个ng-repeat?

例如,

<select ng-repeat="thing in things, item in items"></select>

1 个答案:

答案 0 :(得分:1)

不,不是。在控制器级别连接两个列表并迭代一个列表。

$scope.things = [1,2,3];
$scope.items ["item", "item2"];
$scope.combined = $scope.things.concat($scope.items);