How do I properly bind VueJs methods scope to a returned Firebase Promise so that I can call the VueJS Modal?
login: function () {
fireAuth.signInWithEmailAndPassword(this.signIn.email, this.signIn.password)
.then(function (user) {
if (!user.emailVerified) {
this.$modal.show('email_verification', {
text: 'Please verify your email'
})
}
}, function (error) {
console.log(error.message);
})
}
However, I am encountering the following error:
TypeError: Cannot read property '$modal' of undefined