|
|
|
@@ -1,4 +1,6 @@ |
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
import { Router } from '@angular/router'; |
|
|
|
import { AuthService } from '../auth/service/auth.service'; |
|
|
|
|
|
|
|
@Component({ |
|
|
|
selector: 'app-footer', |
|
|
|
@@ -7,9 +9,18 @@ import { Component, OnInit } from '@angular/core'; |
|
|
|
}) |
|
|
|
export class FooterComponent implements OnInit { |
|
|
|
|
|
|
|
constructor() { } |
|
|
|
constructor(protected authService: AuthService, protected router: Router) { } |
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
} |
|
|
|
|
|
|
|
isLogedIn (): boolean { |
|
|
|
return !!this.authService.user; |
|
|
|
} |
|
|
|
|
|
|
|
logout () { |
|
|
|
this.authService.logout(); |
|
|
|
this.router.navigate(['login']); |
|
|
|
} |
|
|
|
|
|
|
|
} |