TableController의 데이터 구조를 감안할 때 : 당신의 목표는 같은 테이블을 만들 수 있다면각도 중첩 된 NG 반복 테이블
var obj = {
titles : {
title: 'Title'
, data : ['a title' , 'another title', 'look a title', 'and another']
}
, other-prop : {
title: 'Other Prop'
, data : [3030, 849875, 8888, 48484]
}
}
this.obj = obj;
가 :
table
thead
tr
th "Title"
th "Other Prop"
tbody
tr
td "a title"
td "3030"
tr
td "another title"
td "849875"
tr
td "look a title"
td "8888"
tr
td "and another"
td "48484"
어떻게 당신이 NG-반복 구조 것입니까? 저를주고있다
div [controller="TableController as table"]
table
thead
tr
th [ng-repeat = "(key, value) in table.obj"]
tbody
tr [ng-repeat = "(key, value) in table.obj"
td [ng-repeat="(key, val) in table.obj track by $index"] "{{value.data}}"
...
table
thead
tr
th "Title"
th "Other Prop"
tbody
tr
td "['a title' , 'another title', 'look a title', 'and another']"
td "[3030, 849875, 8888, 48484]"
tr
td "['a title' , 'another title', 'look a title', 'and another']"
td "[3030, 849875, 8888, 48484]"
을 ... 그래서 가까운 해요하지만 난 좀 .. 개체가 올바른 방향으로 나열하지 못할 : 지금은 있습니다.
누구나?
더 나은 관계를 위해 모델을 사전 처리하지 않으면 좋은 방법이 없습니다. 데이터를 다르게 구성해야합니다. –