I was recently working on an angular starter kit, mainly to help me understand more about the intricacies angular. I’ve been working with angular now for about 8 months and I really like how it’s structured and all the infrastructure provided with the framework. While putting this starter kit together I wanted to include a loading spinner that was smart enough to know when it should be displayed without having to manually start/stop it.
I was watching some tutorial and the topic of interceptors was brought up, specifically an Http Interceptor. What this interceptor does is allow you to intercept an HttpRequest before it’s sent to the server and after the server responds. This functionality has given me all sorts of ideas but we’ll get to those at some later date.

#interceptors #angular #loading-spinner #typescript

Angular: Loading spinner using Http Interceptor
12.60 GEEK