Created
November 9, 2020 22:00
-
-
Save blogcacanid/784a7bd5f76e682a1e7a7077bf93cc06 to your computer and use it in GitHub Desktop.
profile.component.ts Authentication JWT Angular 9 Lumen 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { TokenStorageService } from '../_services/token-storage.service'; | |
@Component({ | |
selector: 'app-profile', | |
templateUrl: './profile.component.html', | |
styleUrls: ['./profile.component.css'] | |
}) | |
export class ProfileComponent implements OnInit { | |
currentUser: any; | |
constructor(private token: TokenStorageService) { } | |
ngOnInit(): void { | |
this.currentUser = this.token.getUser(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment