I have the following code that would execute, but on a button click that calls function 'Auth', I get an error that it is not defined. Why is that? I did define it in the below code, did I not?
app.get('/sign-in', function(req, res, next) {
res.render('sign-in', {
title: 'Sign In'
})
function Auth(event) {
event.preventDefault()
firebaseAuth.signInWithEmailAndPassword('email@email.com', 'password').catch(function(error) {
var errorCode = error.code
var errorMessage = error.message
console.log(errorCode)
console.log(errorMessage)
})
}
})
via kupak12
No comments:
Post a Comment