Angular · Middle · Question 25 of 75
What does multi: true do in a provider?
- ✓Correct answer: Several providers for the same token are collected into an array instead of overriding each other
- 2The service is created once per module
- 3The provider can be injected multiple times per component
Explanation
Multi-providers let many parts of the app contribute to one extension point (validators, initializers). inject(TOKEN) returns an array of all contributed values.