Reputation: 433
I'm using a ng-repeat to loop through some data to show on a table. I want the format to be 2 columns and 1 row under the 2 columns...
Right now I have:
<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>
For example:
Upvotes: 0
Views: 47
Reputation: 362360
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>
Upvotes: 2