Trying to implement lazy load using Requirejs and AngularAMD utility with angularjs.
Everything is fine.
The problem is I have number of controllers, so when I want to load addUserCtrl.js
, it get loaded. I am happy that other controller js not loaded yet.
Now the issue rises: when I load allUsersCtrl.js
, it get loaded, but addUserCtrl.js
is also still loaded. So what I want the previous controllers js should not be in loaded state. Because the application is having number of controllers.
How can I fix it?