javascript - How to include controller.js files in partials in angular? -


the 1 problem have angular.js apps can tell every single ".js" file service, controller, factory, etc. needs referenced or included in "index.html" file or causing end user have download js @ 1 time, can big if you've got lot of "modules".

is there way in angular make such instead of referencing ".js" files in index.html, make each ".html" partial contains script tages referencing say: mydirectiveandcontroller.js never included in "index.html", included in mydirectiveandcontroller.html (assuming specific directive not available user unless user clicks on specific link).

i want save bandwidth having user load in more need @ start, , linking every single directive , controller possibly used in application, or combining single fat minified js file not seem solve issue.

i open alternatives solve problem.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -