0
我有一个对象我试图遍历和具有麻烦嵌套ng-repeats
嵌套阵列NG-重复错误:[ngRepeat:愚弄]
$scope.report_data = {
data [
system_0: [
0: "string",
1: 435,
2: "another value"
]
],
headers [
0: [
0:"title"
1: "CHA"
]
]
}
我试图建立一个表标题因为每个数据都被映射到标题。
我现在所拥有的是什么
<table>
<thead>
<tr>
<th ng-repeat="header in report_data.headers">{{ header.0 }}</th>
</tr>
</thead>
<tbody>
<tr>
<td ng-repeat="system in report_data.data">
<span ng-repeat="_item in system">{{ _item }}</span>
</td>
</tr>
</tbody>
<table>
但我不能每个项目迭代中的每个系统,并将其添加为一列。我收到的错误是Error: [ngRepeat:dupes]
迭代嵌套数组的最佳方式是什么?
可能重复的[角纳克重复错误“中的中继器不允许重复。”](http://stackoverflow.com/questions/16296670/angular-ng-repeat-error-duplicates-in -re-repeater-are-not-allowed) – PSL 2014-10-27 20:39:24
另一个http://stackoverflow.com/questions/20452223/ng-repeat-not-working-over-collections-that-contains-dupes – PSL 2014-10-27 20:39:52
http:// stackoverflow。 COM /问题/ 26152576/ngrepeatdupes-重复式中继器,用套式ngrepeat和空串/ 26152601#26152601 – PSL 2014-10-27 20:41:19