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