Projekt

Obecné

Profil

Stáhnout (640 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1
import {Component, OnInit} from '@angular/core';
2
import {AuthService} from '../../../auth/services/auth.service';
3
import {Router} from '@angular/router';
4
import {UserState} from '../../../auth/states/user.state';
5

    
6
@Component({
7
  selector: 'app-nav-bar',
8
  templateUrl: './nav-bar.component.html',
9
  styleUrls: ['./nav-bar.component.scss']
10
})
11
export class NavBarComponent implements OnInit {
12

    
13
  constructor(
14
    private authService: AuthService,
15
    private router: Router,
16
    private userState: UserState
17
  ) {
18
  }
19

    
20
  ngOnInit(): void {
21
  }
22

    
23
  logOut(): void {
24
    this.userState.setLoggedIn(false);
25
    this.authService.doLogout();
26
  }
27
}
(3-3/3)