source: src/Clients/Angular/finki-chattery/src/app/shared-app/components/generic/header/header.component.ts@ cbdbb49

dev
Last change on this file since cbdbb49 was 77cfe5b, checked in by Стојков Марко <mst@…>, 3 years ago

Search is in navbar

  • Property mode set to 100644
File size: 751 bytes
Line 
1import { Component, OnInit } from '@angular/core';
2import { Router } from '@angular/router';
3import { AuthService } from 'src/app/core/services';
4import { ButtonType } from '../button/button.models';
5
6@Component({
7 selector: 'app-header',
8 templateUrl: './header.component.html',
9 styleUrls: ['./header.component.scss']
10})
11export class HeaderComponent implements OnInit {
12 ButtonType = ButtonType;
13
14 constructor(public auth: AuthService, private router: Router) {}
15
16 ngOnInit(): void {}
17
18 logout(): void {
19 this.auth.logout();
20 }
21
22 askQuestion(): void {
23 this.router.navigateByUrl('questioning/ask');
24 }
25
26 navigateFromLogo(): void {
27 if (this.auth.isStudent()) {
28 this.router.navigateByUrl('questioning/preview');
29 }
30 }
31}
Note: See TracBrowser for help on using the repository browser.