You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can lazy load a controller file in routing. So that controller file is loaded when its needed.
but I want to know what is the best way to lazy load service file which is being used in multiple controllers?
As loading a single service file in resolves of multiple states will cause lots repetition of code.
Like this I have many common services which are needed in many places and loading all of them in index file will make system loading slow at first.
The text was updated successfully, but these errors were encountered:
Perhaps you could bundle the service names array to be returned in a couple functions and then use that in the resolve to reduce the duplication so if a service names changes or whatever you can just change it in the function instead of all the routes?
I can lazy load a controller file in routing. So that controller file is loaded when its needed.
but I want to know what is the best way to lazy load service file which is being used in multiple controllers?
As loading a single service file in resolves of multiple states will cause lots repetition of code.
Like this I have many common services which are needed in many places and loading all of them in index file will make system loading slow at first.
The text was updated successfully, but these errors were encountered: