I have a JSON array which has a structure like below:
[{"a":"b","child":[{"a":"c","child":["a":"d","child":[]]}]
This array have have any level of children and the levels are variable. Basically, I've built a JSON array over a site structure. I need to iterate over this list and build a HTML structure like below:
<ul>
<li>
<a href="b">
<ul>
<li>
<a href="c">
<ul>
<li> <a href="d"> </li>
</ul>
</a>
</li>
</ul>
</a>
</li>
</ul>
Please let me know if this can be achieved in AngularJS using ng-repeat and ng-template.
Try following