@devcorp-libs/dialog

A dialog service similar to the @angular/material/dialog so it can be used to create dialogs anywhere with any libraries in the same fashion.

Usage no npm install needed!

<script type="module">
  import devcorpLibsDialog from 'https://cdn.skypack.dev/@devcorp-libs/dialog';
</script>

README

Dialog

A dialog service similar to the @angular/material/dialog so it can be used to create dialogs anywhere with any libraries in the same fashion.

It appends the component to the body, so any overlay and client window positioning need to be handled.

Usage

@Component()
class YourDialogComponent {}

@Component()
class YourComponent {

  constructor(private readonly dialog: DclDialogService) { }

  public showDialog() {
    const dialogRef = this.dialog.open(YourDialogComponent, { data: {} });

    dialogRef.afterClosed().subscribe(result => {
      // Do something
    });
  }
}