I have this abstract class as component base:
protected constructor(
protected model: Type<T>,
protected activatedRoute: ActivatedRoute,
protected router: Router,
protected service: CrudServiceBase<T>,
private ng7MatBreadcrumbService :Ng7MatBreadcrumbService
) {}
ng7MatBreadcrumbService is not depend on components but i have to passing this service in each children components! Is there any way to using ng7MatBreadcrumbService without passing that in each children components?
You need to inject it in every component that uses it. Decorator @Injectable() means that you need to inject it for use. Service itself means that it should be injected, you just choose type of the injection.
More about it here: https://angular.io/guide/dependency-injection