Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getProfile(){
- let headers = new Headers();
- this.loadToken();
- headers.append('Authorization', this.authToken);
- headers.append('Content-Type','application/json');
- return this.http.get('http://localhost:8080/users/profile',{headers: headers})
- .map(res => res.json());
- }
- this.authService.getProfile().subscribe(profile => {
- this.user = profile.user;
- },
- err => {
- console.log(err);
- return false;
- });
Add Comment
Please, Sign In to add comment