I am attempting to create a table in AngularJS which has multiple rows per item. The output needs to be similar to:
<table>
<tr><td>Item 1 Row a</td></tr>
<tr><td>Item 1 Row b</td></tr>
<tr><td>Item 1 Row c</td></tr>
<tr><td>Item 1 Row d</td></tr>
<tr><td>Item 2 Row a</td></tr>
<tr><td>Item 2 Row b</td></tr>
<tr><td>Item 2 Row c</td></tr>
<tr><td>Item 2 Row d</td></tr>
</table>
What would be the best way of achieving this? Is there an approach I can take that requires markup like this:
<table>
<tag ng-repeat="item in data">
<tr><td>Item {{item.id}} Row a</td></tr>
<tr><td>Item {{item.id}} Row b</td></tr>
<tr><td>Item {{item.id}} Row c</td></tr>
<tr><td>Item {{item.id}} Row d</td></tr>
</tag>
</table>
EDIT:
data will be along these lines:
{"data": [
{
"id": 1
},
{
"id": 2
},
{
"id": 3
}
]}
<td ng-repeat="x in ['a','b','c','d']">Item {{item.id}} Row {{x}}</td><td>should have been in a different row. Editing it nowdata?