Last active
May 21, 2017 11:21
-
-
Save avatsaev/4863955bf96d73574b03b5585022236d 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 {Router} from "@angular/router"; | |
import {AuthService} from "../services/auth.service"; | |
import {Angular2TokenService} from "angular2-token"; | |
@Component({ | |
selector: 'app-profile', | |
templateUrl: './profile.component.html', | |
styleUrls: ['./profile.component.sass'] | |
}) | |
export class ProfileComponent implements OnInit { | |
constructor(public authTokenService:Angular2TokenService, | |
public authService:AuthService, | |
private router:Router) {} | |
logOut(){ | |
this.authService.logOutUser().subscribe(() => this.router.navigate(['/'])); | |
} | |
ngOnInit() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment