Close Dialog from typescript

less than 1 minute read

Close Dialog from typescript

Use this code:

  //constructor
  constructor(public dialogRef: MatDialogRef<any>) {
  }
  //method to close
  close() {
    this.dialogRef.close();
  }

Leave a comment