저는 각도가 약간 새롭고 json과 ng-repeats에 문제가 있습니다.JSON이 포함 된 JSON에서 ng-repeat 사용
이{
"modules":
{
"module1":
{
"title":"name of module1",
"description":"description of module1",
"weeks":{"week1":{"title":"Week 01"}
},
"module2":
{
"title":"name of module2",
"description":"description of module2",
"weeks":{"week2":{"title":"Week 02"},"week3":{"title":"Week 03"}
}
}
}
내 최종 출력은 테이블이며, 나는 모듈이 반복 얻을 수 있습니다,하지만 난 힘든 시간을 인식하지 못했습니다 : 나는 그들을 내 "모듈"과 "주"의 다음 목록의 목록을 가지고 주를 되 돌리는 것이 내가 잘못하고있는 일. 여기 내 템플릿입니다 :
<table class="table table-bordered" ng-repeat="module in ocw.modules">
<tr>
<td>
<h3 class="moduletitle">{{ module.title }}</h3>
<h4>Description</h4>
<p>{{ module.description }}</p>
</td>
</tr>
<tr ng-repeat="week in ocw.modules.weeks">
<td>
{{ week.title }}
</td>
</tr>
</table>
그래서 의지 출력 2 테이블, 적절한 제목과 설명과 함께,하지만 난 몇 주 동안 제대로 표시 얻을 수없는 것. 일부 "모듈"에는 "1 주일"이 더 많습니다. 오류가 내 템플릿 또는 json에 있는지 확실하지 않습니다.
도움 주셔서 감사합니다. S
pls는 당신의 바이올린을 공유 오브젝트 구조가 더 의미 구문 오류 –