Question from the Angular test

What is the main purpose of the* providedIn: 'root'* property which is automatically put on each generated service?

Medium

Besides allowing the registration of the provider, what is the main purpose of the* providedIn: 'root'* property which is automatically put on each generated service?

Author: Emmanuel DemeyStatus: PublishedQuestion passed 2611 times
Edit
1
Community Evaluations
developer avatar
No
26/06/2024
NW : it allows you to benefit from Tree Shaking