Im building an angular 2 app, and i need a way to get a reference to a service/class that is injected/instantiated by angular framework.
I have a generic class...let
As far as I know you have two choices:
1) Manually pass the service into the Custom class constructor.
let x = new Custom(this.userService);
2) Make the Custom class a service as well. Then it will participate in Angular's DI.
See this article for more information: https://blog.thoughtram.io/angular/2015/05/18/dependency-injection-in-angular-2.html