我在使用動態rowspan創建動態表時遇到了問題。我的json是一個對象數組。元素對象也是數組。元素數組應該作爲動態rowspan的否。 我有一個JSON,如:AngularJS ng-repeat-start ng-repeat-end with table and rowspan
{
"roleTypes": [
{
"roleType": {
"name": "SOA Role"
},
"rates": [
{
"rateType": {
"name": "new Rate"
},
"hourlyRate": {
"value": 1222
},
"internalRate": {
"value": 433
}
},
{
"rateType": {
"name": "myRate"
},
"hourlyRate": {
"value": 1350
},
"internalRate": {
"value": 1650
}
}
]
},
{
"roleType": {
"name": "SOA Role"
},
"rates": [
{
"rateType": {
"name": "new Rate"
},
"hourlyRate": {
"value": 1222
},
"internalRate": {
"value": 433
}
},
{
"rateType": {
"name": "myRate"
},
"hourlyRate": {
"value": 1350
},
"internalRate": {
"value": 1650
}
}
]
},
{
"roleType": {
"name": "AngularJs Developer"
}
}
]
}
如果我想使用NG-重複啓動和NG-重複結束,並進行表結構像下面
:
roleType------ | rateType-----hourlyRate--------internalRate
---------------------------------------------------------------------------
| new Rate 1222 433
---------------------------------------------------
SOA Role | myRate 1350 1650
---------------------------------------------------------------------------
| new Rate 1222 433
---------------------------------------------------
AngularJs Developer |myRate 1350 1650
---------------------------------------------------------------------------
我掙扎着爬動態的rowspan。請檢查是否有人可以幫忙。
這是無效的JSON。你可以請張貼正確的嗎? –