【发布时间】:2020-08-15 11:15:33
【问题描述】:
我的 html 表中很少有来自大学团体的申请。
每所大学可以有不同的小组。每个小组目前只有一名学生。
我有类似这样的角度代码的 html
<table>
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>State</th>
<th>Group Name</th>
<th>University</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="application in $ctrl.applications track by application.id"
<td>
<div ng-repeat="student in ::application.students track by $index">
{{:: student.name }}
</div>
</td>
<td>
<div ng-repeat="student in ::application.students track by $index">
{{:: student.address }}
</div>
</td>
<td>
<div ng-repeat="student in ::application.students track by $index">
{{:: customer.state }}
</div>
</td>
<td>{{:: application.groupName}}</td>
<td>{{:: application.university }}</td>
</tr>
</tbody>
</table>
这给了我当前的输出
现在需求发生了变化。
每个小组可以有任意数量的学生。每个学生都有自己的地址、州。
现在表格应该是这样的
但是,如果我传递修改后的数据(单个应用程序中有多个学生),我会看到这个
非常感谢任何帮助。提前谢谢你。
编辑:
之前没提过一件事。
整行都是可点击的。
因此,在第二张图片(这是所需的输出)中,我应该能够同时点击 Alex 和 Steve,即,他们应该被视为表格中的单个单元格。
【问题讨论】:
标签: html css angularjs html-table