Angular show spinner for every HTTP request with very less code changes
@jornare has a good idea in his solution. He’s handling the case for multiple requests. However, the code could be written simpler, without creating new observable and storing requests in memory. The below code also uses RxJS 6 with pipeable operators: import { Injectable } from ‘@angular/core’; import { HttpRequest, HttpHandler, HttpInterceptor, HttpResponse } from … Read more