Let's say I have a Base Component -
export class BaseComponent {
public constructor(public myService: MyService) {
}
}
And a Derived Component -
export class DerivedComponent extends BaseComponent {
public constructor(public myService: MyService) {
super(myService);
}
}
But I only really need the myService dependency in BaseComponent. Is there any way to avoid having to add the extra constructor to DerivedComponent?
Removing the dependency from the DerivedComponent seems to result in it not being injected.