One of my requirements involves assigning index values to child rows. The structure includes group rows with child rows underneath. Currently, I am using ng-repeat along with $index for the children as shown below:
HTML code:
<table ng-repeat="node in data">
<tr> <td> {{node.groupName}} </td> </tr>
<tbody ng-model="node.nodes">
<tr ng-repeat="node in node.nodes"> <td> {{$index}} </td> </tr>
</table>
However, the output is different from what I want:
https://i.stack.imgur.com/uQGyJ.png
I aim to achieve a display similar to this:
https://i.stack.imgur.com/ZNYAw.png
Being new to AngularJS, I am unsure about how to accomplish this layout. Any guidance on how I can achieve the desired result would be greatly appreciated.