import { Store } from '@ngxs/store';
export class Service {
constructor(private _store: Store) {}
}
export abstract class A {
constructor( private _service: Service ) { }
}
export class B extends A {
constructor( private _service: Service ) {
super(_service);
}
}
I want to find a way to prevent classes like B from having to declare and pass the service to A multiple times. I looked into using ReflectiveInjector, but it seems to only work when all providers have the @Injectable() decorator, which the Store does not have.
Does anyone have any ideas on if and how this could be achieved?