Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: TS subscribe for modal close event

appresearcher free asked 4 years ago


When using your Angular MDB modal, what is your equivalent solution to the following Material subscribe?

dialogRef.afterClosed().subscribe(result => {
  this.loggingIn=false;
  // console.log('The dialog was closed');
});

Arkadiusz Idzikowski staff answered 4 years ago


You can subscribe to close event in ModalService:

this.modalService.closed.subscribe(() => console.log('modal closed'));

It is described in our documentation:

https://mdbootstrap.com/docs/angular/modals/basic/#listen-to-events



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 9.0.0
  • Device: Surface Pro
  • Browser: Any
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No