Below the object should generate table rows for parent and child objects under the same table (like siblings). as it may be, I used ng-repeat-start but not used. I need this for equal alignments.
[ {'name':'parent1','children':[{'name':'child1'},{'name':'child2'}]}, {'name':'parent2','children':[{'name':'child1'},{'name':'child2'}]} ...... ] <table> <tr ng-repeat="parent in obj"> <td>{{parent.name}}</td> </tr> <tr ng-repeat="child in parent.children"> <td>{{child.name}}</td> </tr> ...........
The table should be generated as shown below:
<table> <tr> <td>Parent1</td> </tr> <tr> <td>child1</td> </tr> <tr> <td>child2</td> </tr> <tr> <td>Parent2</td> </tr> <tr> <td>child1</td> </tr> <tr> <td>child2</td> </tr> ...... </table>
angularjs angularjs-ng-repeat
shaik
source share