Skip to content
kappys1 edited this page Feb 18, 2019 · 1 revision

All are in the result of promise after you create a Modal.

  • onOpen: when Modal is open.
  • onClose: when Modal is closed.
  • onDestroy: when Modal is destroyed.

Example:

this.modalService.create(SampleModalComponent, {}).then((modal: NgxModal) => {
  modal.open();
  modal.onDestroy.subscribe(val => { window.alert('Modal Destroyed'); });
});
Clone this wiki locally