Background
We're building an Angular2 app, and are accumulating a lot of specific services relating to one module. All these services are loosely coupled to a Subject event system in the app.
Instantiation via the Constructor
Because these services are never directly referenced, and only subscribe to events, we just have to instantiate them somehow. Currently we just inject them into a constructor of another service that is used.
// Services not used, just to make sure they're instantiated
constructor(
private appService1: AppService1,
private appService2: AppService2,
private appService3: AppService3,
...
){ }
This seems like a bit of a hack, is there a better way to explicitly state services that need to be instantiated without injecting them through a constructor?