a4-http-overlay-interceptor
v9.0.0
Published
HTTP Overlay interceptor to show/hide overlay/spinner
Downloads
30
Readme
a4-http-overlay-interceptor
Angular 7 Http Overlay Interceptor
How-To
Install
npm install a4-http-overlay-interceptor
app.module.ts
- Add
HttpOverlayModule
to imports of theapp.module.ts
.
...
import { HttpOverlayModule } from 'a4-http-overlay-interceptor';
...
@NgModule({
declarations: [
AppComponent
],
imports: [
...,
HttpOverlayModule,
...
],
...
})
Inject the service
constructor(private httpOverlayService: HttpOverlayService) { }
Show/Hide the Spinner
this.httpOverlayService.setOverlayCallBacks(
() => {
... // show spinner code
}, () => {
... // hide spinner code
}
);