我使用ng-repeat循环显示一些数据以显示在表格上。我希望格式为2列的2列和1行...
现在我有:
<table class="table table-borderless table-striped">
<tbody>
<tr ng-repeat="file in files">
<td>{{file}}<br>
</td>
<td>{{file.name}}</td>
<td>{{file.error.message}}</td>
</tr>
</tbody>
</table>
例如:
答案 0 :(得分:2)
Use ng-repeat-start
and ng-repeat-end
...
<tr ng-repeat-start="f in files">
<td>{{file}}</td>
<td>{{file.name}}</td>
</tr>
<tr ng-repeat-end="">
<td colspan="2">
{{file.error.message}}
</td>
</tr>