typescript - Initialising MdDialog in angular material , instead of initialising MdDialog from constructor -
i trying out md-dialog mentioned in angular material
https://material.angular.io/components/dialog/examples
constructor(public dialog: mddialog) {} opendialog(): void { let dialogref = this.dialog.open(dialogoverviewexampledialog, { width: '250px', data: { name: this.name, animal: this.animal } }); dialogref.afterclosed().subscribe(result => { console.log('the dialog closed'); this.animal = result; }); } it's working fine, problem can't use constructor initialize mddialog
is there way can initialise mddialog , use this
let dialogref = new mddialog()
Comments
Post a Comment