Sometimes, you need to have nested directives. For example, you need to display an array of an array of items. With two levels of nested arrays, it is easy to implement such thing. However, if you need to have a dynamical level of nested arrays, it is not as obvious as implementing two levels of nested arrays.
There are two ways (in my knowledge) to build nested directives.
- Using the directive
ng-include
and one custom directive - Using two custom directives