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
{{ message }}
This repository was archived by the owner on Jan 25, 2021. It is now read-only.
If I want to retrieve an instance of MyCustomClass, I have to first register it with a key name. For that I will have to require this and all the other modules on startup. That means one file will have to require all the modules first and then initialize the application.
This seems in efficient and quite a headache to maintain that one file which contains all the required modules.
RATHER: How about requiring them in modules that actually need them instead
varDep1=require('./dep1');varDep2=require('./dep2');functionMyCustomClass(){}MyCustomClass.$inject=[Dep1,Dep2];//Instead of using key name
So the main idea is to be able to query on the Class name rather than the key name. What do you think?
The Problem statement
This seems in efficient and quite a headache to maintain that one file which contains all the required modules.
RATHER: How about requiring them in modules that actually need them instead
So the main idea is to be able to query on the Class name rather than the key name. What do you think?