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 | |
---|
1 | import { Component, OnInit } from '@angular/core';
|
---|
2 | import { Router } from '@angular/router';
|
---|
3 | import { AuthService } from 'src/app/core/services';
|
---|
4 | import { ButtonType } from '../button/button.models';
|
---|
5 |
|
---|
6 | @Component({
|
---|
7 | selector: 'app-header',
|
---|
8 | templateUrl: './header.component.html',
|
---|
9 | styleUrls: ['./header.component.scss']
|
---|
10 | })
|
---|
11 | export 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.