a4-overlay
v9.0.0
Published
Handle overlay for the entire screen
Downloads
31
Readme
a4-overlay
Angular 7 Overlay
How-To
Install
npm install a4-overlay
app.module.ts
- Add
OverlayModule
to imports of theapp.module.ts
.
...
import { OverlayModule } from 'a4-overlay';
...
@NgModule({
declarations: [
AppComponent
],
imports: [
...,
OverlayModule,
...
],
...
})
app.component.ts
- Add
viewContainerRef: ViewContainerRef
to the constructor ofapp.component.ts
.
...
import { ViewContainerRef } from '@angular/core';
...
constructor(private viewContainerRef: ViewContainerRef) { }
your.component.ts
- Add
overlayService: OverlayService
to the constructor of your component.
constructor(private overlayService: OverlayService) { }
- Invoking the overlay mask can be done by using the service as shown below.
this.overlayService.show(); // to show an overlay over the page
this.overlayService.hide(); // to hide the overlay