-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Description
I am handling errors with MatSnackBar and I have problems with the position in which the dialog is displayed and it is not hidden automatically.
This is a known behavior?
service.ts
facebookLogin() {
const provider = new firebase.auth.FacebookAuthProvider();
return this.oAuthLogin(provider);
}
private oAuthLogin(provider) {
return this.afAuth.auth.signInWithPopup(provider)
.then((credential) => {
this.pushUserData(credential.user)
this.router.navigate(['/userProfile'])
})
.catch(error => {
this.handleError(error);
});
}
private handleError(error: Error) {
console.error(error);
this.snackBar.open(error.message, this.action, { duration: 1000 });
}
component.ts
facebookLogin() {
this.auth.facebookLogin()
}
When I test it from the same component, everything works normal:
openSnackBar() {
this.snackBar.open(this.message, this.action, {
duration: 500,
});
}
Metadata
Metadata
Assignees
Labels
No labels
