getUser(){
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
console.log(user.email)==> erk@erk.com
// User is signed in.
} else {
// No user is signed in.
}
})
console.log(user)==> user is undefined
}
i know its odd question but function only knows what user is in the call back brackets
how to transfer the user object to outer scope best way?
Randell I have another question that is I wonder like this im trying to code a boolean in an promise chain but typescript js doesnt allow it how can I go about it? the code i want to add is in the result promise. {{ this.olga=true}}