- Feb 2017
In general, add providers to the root module so that the same instance of a service is available everywhere.
So, from this I take it that once a Service is added to the root module, it can be used by any component of that module.
What about the components imported, from sub-modules of the root one? Can their dependency needs be met, in similar fashion? For example, could a Component in another module (imported into the root one) just request a Service provided in the root module and have it properly injected from there, without anything else on the developer's part?
you get a new instance of the service with each new instance of that component
So, I take it that the Service instance will not be a singleton anymore? Whereas, if provided from the root module, it will?