I have an object containing infinitely nested data, like the following example:
[
{
name: \"Foo\",
value: \"Bar\",
sub: [
{
n
Yes, it is possible by using inline template
Example :
<script type="text/ng-template" id="namVal">
{{ item.name}}
<ul ng-if="item.sub">
<li ng-repeat="item in item.sub" ng-include="'namVal'"></li>
</ul>
</script>
in html
<ul>
<li ng-repeat="item in items" ng-include="'namVal'"></li>
</ul>
UPDATED using Plunkr example by @alexandernst http://plnkr.co/edit/dKlrvtYH1IbQXFUEk2Wx?p=preview