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