angular - MdDialogRef.close doesn't close the dialog when called from a callback fn -


i followed official https://material.angular.io/components/dialog/overview states if dialog component has closed, need inject mddialogref reference below , close on event

export class logindialogcomponent {   constructor(public dialogref: mddialogref<logindialogcomponent>,       @inject(md_dialog_data) public data: any, public afauth: angularfireauth, private router: router) {   }    closedialog(): void {     this.dialogref.close();   }    signinwithgoogle() {     const self = this;     this.afauth.auth         .signinwithpopup(new firebase.auth.googleauthprovider())         .then(res => {           self.closedialog();         });   } } 

on successful response google oauth, see closedialog() called. however, dialog isn't closed. [i have no issues closing dialog part of settimeout/useraction]


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -