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

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -