how to close mat dialog code example
Example 1: mat dialog disable close
this.dialog.open(DialogComponent, { disableClose: true });
Example 2: close mat dialog from component
@Component({/* ... */})
export class YourDialog {
constructor(public dialogRef: MatDialogRef<YourDialog>) { }
closeDialog() {
this.dialogRef.close('Pizza!');
}
}