a4-overlay
TypeScript icon, indicating that this package has built-in type declarations

9.0.0 • Public • Published

a4-overlay

Angular 7 Overlay

How-To

Install

npm install a4-overlay

app.module.ts

  1. Add OverlayModule to imports of the app.module.ts.
...
import { OverlayModule } from 'a4-overlay';
...

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    ...,
    OverlayModule,
    ...
  ],
  ...
})

app.component.ts

  1. Add viewContainerRef: ViewContainerRef to the constructor of app.component.ts.
...
import { ViewContainerRef } from '@angular/core';
...

constructor(private viewContainerRef: ViewContainerRef) { }

your.component.ts

  1. Add overlayService: OverlayService to the constructor of your component.
constructor(private overlayService: OverlayService) { }
  1. 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

Readme

Keywords

Package Sidebar

Install

npm i a4-overlay

Weekly Downloads

2

Version

9.0.0

License

MIT

Unpacked Size

133 kB

Total Files

26

Last publish

Collaborators

  • cccheng