我嘗試創建一個像Full Tilt Payout Structure這樣的表格。我決定創建下圖:Angular:從json地圖繪製表格
$scope.payoutStructure = {
'2-4': {
1: 100,
2: 0,
3: 0,
4: 0,
5: 0,
6: 0,
},
'6-7': {
1: 65,
2: 35,
3: 0,
4: 0,
5: 0,
6: 0,
}
}
等等...
但我無法弄清楚如何呈現它。如果我沒有記錯,起初我也呈現頭這樣的:
<thead>
<tr>
<th><strong>Position \ Entries</strong></th>
<th ng-repeat="key in payoutStructure.keys()">{{key}}</th> //I'm not sure about .keys(), because they are not render in order as I know
</tr>
</thead>
但我不能得到如何使TBODY。好像我有使用數組而不是地圖,但我希望通過像鑰匙中獲取價值:
{{payoutStructure[entries]['1']}}
的NG-重複文檔解釋語法渲染對象 – charlietfl