升级到angular 8后,找不到'@angularcommonhttpsrcclient'的HttpObserve。

问题描述 投票:0回答:1
import { HttpObserve } from '@angular/common/http/src/client';
import { HttpParams, HttpHeaders } from '@angular/common/http';

type responseType = 'arraybuffer' | 'blob' | 'json' | 'text';

export interface RequestOptions {
  body?: any;
  headers?: HttpHeaders;
  params?: HttpParams;
  observe?: HttpObserve;
  reportProgress?: boolean;
  responseType?: responseType;
  withCredentials?: boolean;
}

升级到angular 8后,上面的代码出现了下面提到的错误,有什么帮助吗?

error TS2307: Cannot find module '@angular/common/http/src/client'.

angular interface client httpresponse observers
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.