http-toggle-spinner
v0.0.3
Published
This package helps you, with minimal configuration, to show/hide spinners based on the no of http requests in progress. You dont have to bother about showing or hiding spinners again.
Readme
Purpose of this npm package ?
This package helps you, with minimal configuration, to show/hide spinners based on the no of http requests in progress. You dont have to bother about showing or hiding spinners again.
Configuration
- Import the HttpSpinnerModule as below.
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
HttpSpinnerModule
],
bootstrap: [AppComponent]
})
export class AppModule { }
- Add the
http-toggle-spinnercomponent selector to your root component. Add the image or element or component that functions as the spinner in your application, between the angular brackets of the selector as below.
<http-toggle-spinner>
<!--Add the spinner image or element or 3rd party component here>-->
</http-toggle-spinner>
- This package will automatically handle showing/hiding the spinner whenever there is a single/multiple API calls in progress/completed.
