Skip to content

Instantly share code, notes, and snippets.

@agrgic16
Last active April 24, 2019 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agrgic16/8f9770abebc7ffe6cc9b1b16ef8445ef to your computer and use it in GitHub Desktop.
Save agrgic16/8f9770abebc7ffe6cc9b1b16ef8445ef to your computer and use it in GitHub Desktop.
Typical Angular Material Dialog Parent
@Component({
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 = this.dialog.open(DialogOverviewExampleDialog, {
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