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
Post a Comment