I'm trying to incorporate a spinner into my Angular Application using ngx-spinner. I've come across this library but haven't found enough practical examples on how to use it effectively. Specifically, I want to integrate the spinner with my http requests. Can someone guide me on how to properly show and hide the spinner in this context?
public getCars(){
this.spinner.show();
this.appService.getCars().subscribe(
car => {
this.carList=car;
for (let i = 0; i < this.carList.length; i++) {
let make = this.carList[i].make;
}
this.spinner.hide();
},
);
}
I have successfully installed and imported ngx-spinner, however, I am facing challenges in utilizing it within my http requests. Any assistance or suggestions would be greatly appreciated.