I have a straightforward layout
function adjustLinks($scope) {
$scope.links = [
{
text: 'Menu Item 1',
url: '#',
},{
text: 'Menu Item 2',
url: '#',
submenu: [
{
text: 'Sub-menu Item 3',
url: '#',
},{
text: 'Sub-menu Item 4',
url: '#',
submenu: [
{
text: 'Sub-sub-menu Item 5',
url: '#',
},{
text: 'Sub-sub-menu Item 6',
url: '#',
}
]
}
]
},{
text: 'Menu Item 3',
url: '#',
}
];
}
I am interested in creating a table where the child items are displayed in successive rows following their parent item:
Menu Item 1
Menu Item 2
Sub-menu Item 3
Sub-menu Item 4
Sub-menu Item 5
Sub-menu Item 6
Menu Item 3
<table>
<thead>
<tr>
<th>Title</th>
<th>Url</th>
</tr>
</thead>
<tbody>
<tr>
<td>Menu Item 1</td>
<td>#</td>
</tr>
<tr>
<td>Menu Item 2</td>
<td>#</td>
</tr>
<tr>
<td>Sub-menu Item 3</td>
<td>#</td>
</tr>
<tr>
<td>Sub-menu Item 4</td>
<td>#</td>
</tr>
<tr>
<td>Sub-menu Item 5</td>
<td>#</td>
</tr>
<tr>
<td>Sub-menu Item 6</td>
<td>#</td>
</tr>
<tr>
<td>Menu Item 3</td>
<td>#</td>
</tr>
</tbody>
</table>
I have explored using ng-repeat-start and ng-repeat-end, but it does not meet my specific requirements.
Would appreciate any suggestions or guidance on how to achieve this setup. Thank you!