我找到了一些
fantastic links
Angular2中的DI解释,但我仍然无法在Safari上使用它。在下面的代码中,它可以在Firefox和Chrome中工作,但我仍然得到一个
Can't resolve all parameters for ApiService: (Http, ?).
在Safari。我错过了什么吗?
import { Injectable } from '@angular/core';
import { Http, Response, RequestOptions, URLSearchParams } from '@angular/http';
import { Observable } from 'rxjs/Rx';
import { EmitterService } from '../services/emitter.service';
@Injectable()
export class ApiService {
constructor (
private http: Http,
private window: Window
) {}
}
据我所知,是否有一个已知的跨浏览器兼容性问题我遗漏了?或者可能是专门为狩猎而设的聚合填料?
-
我已设置@NgModules以包括
HttpModule
也
import { HttpModule } from '@angular/http';