当我用角度6编写服务时,会出现以下错误。
类型'Observable>'不可分配给类型 “可观察”
这是我的服务代码
constructor(private http: HttpClient, private _configuration: Configuration, private router: Router) {
this.actionUrl = _configuration.ServerWithApiUrl;
this._optionBearer = { headers: new HttpHeaders(
{
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + localStorage.getItem('access_token')
}
)};
}
public getList<T>(apiUrl: any): Observable<T> {
return this.http.get<T>(this.actionUrl + apiUrl, this._optionBearer);
}
请帮助我解决问题