Ask a Question
Back to All

Lazy load each required controller after bundling all minified controllers

I created a minified file with all controllers and named it as all.js, Now it has all controllers in it.

Is there any way to add required controllers to this all.js file dynamically.

Ex: initially all.js file should have only 'HomeCtrl', when i redirect to profile page, now all.js file should have 'ProfileCtrl' also. based on user actions all.js file should load required controllers in it.