Skip to content

Instantly share code, notes, and snippets.

@blogcacanid
Created November 9, 2020 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blogcacanid/784a7bd5f76e682a1e7a7077bf93cc06 to your computer and use it in GitHub Desktop.
Save blogcacanid/784a7bd5f76e682a1e7a7077bf93cc06 to your computer and use it in GitHub Desktop.
profile.component.ts Authentication JWT Angular 9 Lumen 7
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