我正在寻找可用于从以下 json 生成输出的模板。
寻找外部循环的模板(必须显示标题(从早上 7:00 到下午 1:45 等的会话),值也可以从嵌套列表中获得,然后继续内部循环,我已经完成了内循环,但想知道如何处理外循环。
{
"Sessions from 7:00 am to 1:45 pm":[
{
"id":24,
"name":"Breakfast",
"group_header":"Sessions from 7:00 am to 1:45 pm"
},
{
"id":25,
"name":"Opening Address",
"group_header":"Sessions from 7:00 am to 1:45 pm"
},
{
"id":26,
"name":"Auto Finance p",
"group_header":"Sessions from 7:00 am to 1:45 pm"
},
{
"id":27,
"name":"25 Years of Democratizing Access to Credit",
"group_header":"Sessions from 7:00 am to 1:45 pm"
},
{
"id":28,
"name":"Key Steps to Better Credit Line Management",
"group_header":"Sessions from 7:00 am to 1:45 pm"
},
{
"id":29,
"group_header":"Sessions from 7:00 am to 1:45 pm"
},
]
},
{
"Sessions from 8:00 am to 1:30 pm":[
{
"id":66,
"name":"General Session",
"group_header":"Sessions from 8:00 am to 1:30 pm"
},
{
"id":67,
"name":"Addressing Attrition: ",
"group_header":"Sessions from 8:00 am to 1:30 pm"
},
{
"id":68,
"name":"Regulatory Olympics: Why Conduct Risk Matters - Panel Discussion",
"group_header":"Sessions from 8:00 am to 1:30 pm"
}
]
}
<ul class="table-view">
<li class="table-view-cell" ng-repeat="session in sessions">
<ul class="cell">
<li class="cell-content">
<div class="session" ng-class-odd="'odd'" ng-class-even="'even'">
<span class="name">{{session.name}}</span>
</div>
</li>
</ul>
</li>
</ul>