recursive directive calls itself however many times it is needed based upon some
data object. The object can be organized in any way, but most commonly it is based on a parent-child model. This means that there are nested objects within nested objects that will make up the overall structure of the finally rendered DOM.
recursive directives are needed for various use cases. The most classic cases for a
recursive directive are a drop-down menu or a nested
comment directive. Any directive that builds a similar template based on a
data model and has a need to call itself is a perfect candidate for a
recursive directive. AngularJS makes it very simple to allow directives that call themselves. However, the following ...