DEV Community

Discussion on: Improved Dependency Injection with the new providedIn scopes 'any' and 'platform'

Collapse
 
stagefright5 profile image
stagefright5

The providedIn "any" has a side-effect when using mat-dialog components which exported. Since mat-dialog creates a new injector for the dialog component, a new instance of the service whose providedIn is set to "any" is injected to the dialog.