我有使用此方法的http拦截器
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
this.spinner.show();
return next.handle(req).pipe(tap(() => this.spinner.hide()));
}
将显示所有请求的微调框。如何使它仅在某些请求下出现?例如,标记为:
this.http.get<User>('/user/id', httpOptions, {spinnerAllowed: true})