Angular HTTP Interceptor - Display spinner in multi-module app

后端 未结 4 1527
既然无缘
既然无缘 2020-12-30 11:01

I\'m trying to display the ng4-loading-spinner spinner for HTTP calls made to my API.

I based my code on the examples in the following links:

4条回答
  •  长情又很酷
    2020-12-30 11:41

    The issue was the ApiService was using the Http from @angular/http instead of HttpClient from @angular/common/http.

    So the ApiInterceptor has nothing to intercept.

提交回复
热议问题