Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

close mat dialog from component

@Component({/* ... */})
export class YourDialog {
  constructor(public dialogRef: MatDialogRef<YourDialog>) { }

  closeDialog() {
    this.dialogRef.close('Pizza!');
  }
}
Source by material.angular.io #
 
PREVIOUS NEXT
Tagged: #close #mat #dialog #component
ADD COMMENT
Topic
Name
4+7 =