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

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

Questions for student dropdown

  • Property mode set to 100644
File size: 861 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
32 goToQuestion(questionUid: string): void {
33 this.router.navigateByUrl(`questioning/${questionUid}`);
34 }
35}
Note: See TracBrowser for help on using the repository browser.