Last active
April 24, 2019 21:13
-
-
Save agrgic16/8f9770abebc7ffe6cc9b1b16ef8445ef to your computer and use it in GitHub Desktop.
Typical Angular Material Dialog Parent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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