In this case, just DI will not be enough. This link below refers to the same issue:
http://blog.thoughtram.io/angular/2015/09/17/resolve-service-dependencies-in-angular-2.html
, :
TypeScript , emitDecoratorMetadata. , . TypeScript , , /, . , , .
, Metadta Generations, :
import {HttpService} from 'scripts/httpService';
import {Inject} from 'angular2/core';
export class CurrentBlog{
constructor(@Inject(HttpService) public httpService:HttpService){}
}
import {Injectable} from 'angular2/core';
import {HttpService} from 'scripts/httpService';
@Injectable()
export class CurrentBlog{
constructor(public httpService:HttpService){}
}