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