Hello,
I would like to retrieve all datas of my current user, but I dont know how to do it easier than that ->
The view :
<ng-container *ngIf="currentUser$ | async as currentUser">
<ng-container *ngIf='currentUser.data() as user'>
<p>
{{user.displayName}}
</p>
<p>
{{user.phone}}
</p>
</ng-container>
</ng-container>
the controller :
ngOnInit(){
this.getCurrentUser();
}
getCurrentUser() {
this.authService.getUserDetails().then(u => {
this.currentUser$ = this.userService.getOne(u.uid);
console.log(u.uid);
});
}
the screenshot ->
Could you please help me?
Thanks a lot !