Why don't you use providedIn Injectable feature for services in eagerly loaded modules?
sharikovvladislav opened this issue · 0 comments
sharikovvladislav commented
Example:
HomeAuthResolver is provided in HomeModule. HomeModule is eagerly loaded to AppModule.
I am talking about: https://angular.io/api/core/Injectable
https://angular.io/guide/architecture-services
Registering the provider in the @Injectable() metadata also allows Angular to optimize an app by removing the service from the compiled app if it isn't used.