Skip to content

walosha/ng-perfect-dialog

Repository files navigation

ng-perfect dialog (ZERO DEPENDENCIES) 24 kB

All types of dialogs in one package for Angular

Build Status Support Support Support Support Support

Please support this project by simply putting a Github star. Share this library with friends on Twitter and everywhere else you can.

Table of Contents

Getting Started

npm i ng-perfect-dialog

Implementation

Import NgxDialogsModule in your application module. For example: app.module.ts

import { SuperDialogModule } from "ng-perfect-dialog";

@NgModule({
  imports: [
    SuperDialogModule,
    // ...
  ],
})
export class AppModule {}
import { SuperDialogService } from "ng-perfect-dialog";

export class MyOwnComponent implements OnInit {
  constructor(private superDialogService: SuperDialogService) {}
  notifyDataLoss() {
    this.superDialogService.open({
      component: CustomActionModalComponent,
      modalConfigurations: {
        disableClose: false,
        width: "35.6rem",
      },
      data: {
        name: "Olawale Afuye",
        // any data type
      },
    });
  }

  cancel() {
    this.superDialogService.$close.next(true);
  }
}
export class CustomActionModalComponent implements OnInit {
  name: string = "";
}

Creator

  • Olawale Afuye

License

Support License

Releases

No releases published

Packages

No packages published