I am working on a module where I will have div elements that are nested within div elements that may also be nested in div elements. These div elements will be created by the user when they click a button. The divs may end up looking like so:
div1
1.1. div2
1.2. div3
1.3. div4
1.3.1 div5 1.3.2 div6
2.div7
3.div8
and so forth...
Each of these divs will simply be an html template and I want to bind the data for each of these divs, say the div has a title, and so I will bind each div.
My first plan of action was to use ng-include and simply create ng-includes dynamically by the user and that way the templates will by loaded by ng-include. However, as I have found out, nested ng-includes are not possible due to dependancy issues.
I am aware of libraries that are cooked by users that try to hack their way around doing nesting of ng-includes but I am looking for a good practice of nesting templates, while staying away from extra libraries.
Any suggestions on what would be the best way to dynamically nest templates?