I need to include javascript files dynamically using angular.js. Suppose i have the below project html view structure.
1-index.html.
a)hod.html-hodcontroller.js
i)home.html.-homecontroller.js
ii)about.html.-aboutcontroller.js
b)Princpal.html-princpalcontroller.js
i)home.html-homecontroller.js
ii)about.html -aboutcontroller.js
Let me to explain the above structure.I have one master page(i.e-index.html
). hod.html and Princpal.html
are the partial view to index.html page. Each home.html and about.html
are the again partial view to hod.htmland Princpal.html
so finally these are nested view.Here i am including all js files at a time in index.html
page But here i need when any partial view will attach in index page only the that related .js files will attach in the index page not the all page.So please help me to do this using angular.js.