Guest User

Untitled

a guest
Aug 10th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ### AuthService
  2. public currentUser: Observable<ApplicationUser>;
  3.  
  4.   getCurrentUserInfo(): Observable<ApplicationUser> {
  5.     this.currentUser = this.http.get<ApplicationUser>(this._userInfoUrl);
  6.     return this.currentUser;
  7.   }
  8.  
  9. ## AppComponent
  10. currentUser: Observable<ApplicationUser>;
  11.   ngOnInit() {
  12.     this.authService.getCurrentUserInfo();
  13.     this.currentUser = this.authService.currentUser;
  14.   }
  15.  
  16. ## Widok
  17.  
  18. <a>{{(currentUser | async)?.Email}}</a>
Advertisement
Add Comment
Please, Sign In to add comment