open a dialog and catch "afterClosed" event

UI Components for Angular
Post Reply
rherl23
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?
example:


let dialogRef = dialog.open(UserProfileComponent, {
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 28 guests