Created
January 20, 2018 21:50
-
-
Save dasmido/ad17b84d49e8e1c0aec3e0e368a76000 to your computer and use it in GitHub Desktop.
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 {AuthService} from '../../services/auth.service'; | |
import {Router} from '@angular/router'; | |
@Component({ | |
selector: 'app-profile', | |
templateUrl: './profile.component.html', | |
styleUrls: ['./profile.component.css'] | |
}) | |
export class ProfileComponent implements OnInit { | |
user: Object; | |
constructor( | |
private authService: AuthService, | |
private router: Router) { } | |
ngOnInit() { | |
this.authService.getProfile().subscribe(profile => { | |
this.user = profile.user; | |
}, | |
err => { | |
console.log(err); | |
return false; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment