Nested directives in angularjs link: http://sporto.github.io/blog/2013/06/24/nested-recursive-directives-in-angular/