open a dialog and catch "afterClosed" event

UI Components for Angular
Post Reply
Posts: 3
Joined: 15 Aug 2018, 21:18

14 Oct 2020, 05:48

How can I open a dialog window and catch the "afterClosed" event from the parent component and receive a response from the dialog that was opened?

let dialogRef =, {
height: '400px',
width: '600px',

dialogRef.afterClosed().subscribe(result => {
console.log(`Dialog result: ${result}`); // Pizza!

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests