本文介绍了阵列AngularJS NG重复阵列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
时有可能使用 NG-重复
与数组的数组?
Is it possible to use ng-repeat
with an array of arrays?
下面是我的看法:
<div ng-repeat="item in items">
<p>{{item}}</p>
<ul>
<li ng-repeat="i in item.items">{{i}}</li>
</ul>
</div>
下面是我的控制器:
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope) {
$scope.items = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
]
});
下面是我的Plunker:
。
这篇关于阵列AngularJS NG重复阵列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!