Angular 4 Firebase show user information -


i want query 1 object firebase meets uid of logged in user. this.

fetchuserdata() {     return this.authstate.subscribe(authdata => {         this.db.list(`/users/${authdata.uid}`)      }); } 

in nav-bar component expecting receive user object database.

user:firebaseobjectobservable<user>;  this.user = authservice.fetchuserdata(); 

so question now? async pipe not working. map not working.

in constructor of service.

afauth.auth.onauthstatechanged(function(user) {     if (user) {             //grab user uid.     } else {         console.log('meh');     } }); 

Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -