Angular · Junior · Question 32 of 75
What does providedIn: 'root' mean?
- ✓Correct answer: One shared instance for the whole application, created lazily on first injection
- 2A new instance is created for every component that injects it
- 3The service is only available to the root component
Explanation
Root services are singletons. If a component lists the service in its own providers, it gets a separate instance for itself and its children.