I have this code in angular template which just makes the header on left and data on right from top to bottom.
<div class="panel-body">
<table class="table table-striped">
<tr ng-repeat="f in fields">
<th>{{ f }}</th>
<td>{{ data[f] }}</td>
</tr>
</table>
</div>
But instead of one field in one row i want to have 2 fields in one row and 3rd field and 4th field in second row and so on.
so that i have 2 columns layout
<tr><th>{{ f }}</th>
<td>{{ data[f] }}</td>
<th>{{ f }}</th>
<td>{{ data[f] }}</td>
</tr>
field = ['id', 'name', 'username', 'email', 'age']
data = [{id:1, name: 'john', username: 'john', age: 20, email: 'test'}]
The result i want is
<tr><td>id:</td><td>1</td><td>name:</td><td>john</td></tr>
<tr><td>username:</td><td>john</td><td>age:</td><td>20</td></tr>
This should be done with ng-repeat rather hard coding stuff
fieldsobject ?fieldis a list['id', 'name', 'age', 'email']<table>for this?