I\'m trying to implement a ConfigService to retrieve the right configuration for the right environment in the project. I\'m currently encountering a cyclic dependancy
DI can't resolve cyclic dependencies. A workaround is to inject the injector and acquire the instance imperatively:
@Injectable() class ConfigService { private http: Http; constructor(injector:Injector) { setTimeout(() => this.http = injector.get(Http); } }