So I have created function which sets username, firstname and lastname of currently logged user, it looks like this:
profile = {} as Profile;
...
createProfile() {
this.afAuth.authState.take(1).subscribe(auth => {
this.afDatabase.object(`profile/${auth.uid}`).set(this.profile)
.then(() => this.navCtrl.setRoot(MainPage));
})
}
the data on firebase looks like this:
Now, I would like to create new function in a new page called user.ts:
showdata() { }
So it would display username, firstname, and lastname of the user on user.html
the question is how to do this?
