There are a couple of popular recursive angular directive Q&A\'s out there, which all come down to one of the following solutions:
You can use angular-recursion-injector for that: https://github.com/knyga/angular-recursion-injector
Allows you to do unlimited depth nesting with conditioning. Does recompilation only if needed and compiles only right elements. No magic in code.
{{name}}
One of the things that allows it to work faster and simpler then the other solutions is "--recursion" suffix.