Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Typical Angular Material Dialog Parent
selector: 'dialog-parent-example',
templateUrl: 'dialog-parent-example.html',
styleUrls: ['dialog-parent-example.css'],
export class DialogParentExample {
constructor(public dialog: MatDialog) {}
openDialog(): void {
const dialogRef =, {
width: '250px',
data: {name: 'Sample Dialog'}
dialogRef.afterClosed().subscribe(result => {
console.log('The dialog was closed');
this.animal = result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.