Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### AuthService
- public currentUser: Observable<ApplicationUser>;
- getCurrentUserInfo(): Observable<ApplicationUser> {
- this.currentUser = this.http.get<ApplicationUser>(this._userInfoUrl);
- return this.currentUser;
- }
- ## AppComponent
- currentUser: Observable<ApplicationUser>;
- ngOnInit() {
- this.authService.getCurrentUserInfo();
- this.currentUser = this.authService.currentUser;
- }
- ## Widok
- <a>{{(currentUser | async)?.Email}}</a>
Advertisement
Add Comment
Please, Sign In to add comment