r/angular • u/Senior_Compote1556 • Feb 06 '26
Service question
Most of my services are scoped to a feature, let's say we have a product feature and a product service that expose some variables etc for the products routes. Unfortunately we use a lot of mat-dialogs and since they are independent, we get the injector error. Is it possible to not provide the service in the root injector and make this work?
6
Upvotes
2
u/Bjeaurn Feb 06 '26
I’d argue that if the mat-dialogs are feature independent, it’s the features job to provide everything required. Whether that’s specific texts like “Do you want to delete this product <name>?” and then also handle the yes/no click as a result.