Suppose I have the following JSON structure in my javascript as a variable named myTree:
[
{"name": "A", "children": [
{"name": "C", "children": []},
{"name": "D", "children": []},
]
},
{"name": "B", "children": []}
]
I would like to use AngularJS to render it as the following HTML. How can I do it? FYI, the tree can have arbitrary depth. I have shown only a very simple example here.
<ul>
<li>
A
<ul>
<li>C</li>
<li>D</li>
</ul>
</li>
<li>B</li>
</ul>