All types of dialogs in one package for Angular
Please support this project by simply putting a Github star. Share this library with friends on Twitter and everywhere else you can.
- Getting started
- Installation
- Implementation
- Demo
- Creator
- License
npm i ng-perfect-dialog
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 = "";
}
- Olawale Afuye