I have been following a helpful tutorial and implementing the code from it. The tutorial can be found at the link below:
Within the tutorial, there is a function being called that triggers on every axios request. Here is the code snippet for reference:
mountRequestInterceptor() {
this._requestInterceptor = axios.interceptors.request.use(async config => {
console.log("show loading");
const loading = await loadingController.create({
message: 'Please wait...'
});
await loading.present();
return config;
});
console.log(this._requestInterceptor,'sasdas')
},
The issue I am facing is that the loading indicator starts when an axios request is made but never stops.
I am looking for a solution to make the loading indicator stop once the request is successfully completed.