I have written this HTML to display my data in tree format, but its not working as expected. What is the issue here.
I know I can use custom directive to do that, but I just want it to show in very basic format. Also writing directive for this will be very tricky.
<div data-ng-cloak data-ng-show="rootNode.children.totalAvailable > 0">
<table border=1>
<tr>
<th>Tree Form</th>
</tr>
<tr data-ng-repeat="parent in rootNode.children.items">
<tr>
<td>
{{parent.displayName}}
</td>
</tr>
<tr data-ng-repeat="firstChild in parent.children.items">
<tr>
<td>
{{firstChild.displayName}}
</td>
</tr>
<tr data-ng-repeat="secondChild in firstChild.children.items">
<tr>
<td>
{{secondChild.displayName}}
</td>
</tr>
</tr>
</tr>
</tr>
</table>
</div>
Tree structure I want to display is as follows
Parent 1
Child 1.0
SecondChild 1.0.1
SecondChild 1.0.2
SecondChild 1.0.3
Child 1.1
SecondChild 1.1.1
SecondChild 1.1.2
SecondChild 1.1.3
Parent 2
Child 2.0
SecondChild 2.0.1
SecondChild 2.0.2
SecondChild 2.0.3
Child 2.1
SecondChild 2.1.1
SecondChild 2.1.2
SecondChild 2.1.3
Thanks in advance.