Angular show spinner for every HTTP request with very less code changes

后端 未结 8 535
Happy的楠姐
Happy的楠姐 2020-12-01 03:08

I am working on an existing Angular application. The version is Angular 4.

The application makes HTTP calls to a REST API from lot of various components.

I w

8条回答
  •  独厮守ぢ
    2020-12-01 03:41

    Angular Interceptors can be used in a number of ways as they work pretty well in manipulating and managing HTTP calls to communicate that we make from a client-side web application. We can create an utility for showing Mouse Loader using Interceptor.

    Please go through the below post for the implementation of LoaderInterceptor:-

    Show Loader/Spinner On HTTP Request In Angular using Interceptor

提交回复
热议问题