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
|
Rev | Line | |
---|
[68a1d2f] | 1 | import { Component, OnInit } from '@angular/core';
|
---|
[c205cc4] | 2 | import { Router } from '@angular/router';
|
---|
[68a1d2f] | 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 |
|
---|
[c205cc4] | 14 | constructor(public auth: AuthService, private router: Router) {}
|
---|
[68a1d2f] | 15 |
|
---|
[5ad5988] | 16 | ngOnInit(): void {}
|
---|
[68a1d2f] | 17 |
|
---|
| 18 | logout(): void {
|
---|
| 19 | this.auth.logout();
|
---|
| 20 | }
|
---|
[c205cc4] | 21 |
|
---|
| 22 | askQuestion(): void {
|
---|
| 23 | this.router.navigateByUrl('questioning/ask');
|
---|
| 24 | }
|
---|
[77cfe5b] | 25 |
|
---|
| 26 | navigateFromLogo(): void {
|
---|
| 27 | if (this.auth.isStudent()) {
|
---|
| 28 | this.router.navigateByUrl('questioning/preview');
|
---|
| 29 | }
|
---|
| 30 | }
|
---|
[7e7cc4c] | 31 |
|
---|
| 32 | goToQuestion(questionUid: string): void {
|
---|
| 33 | this.router.navigateByUrl(`questioning/${questionUid}`);
|
---|
| 34 | }
|
---|
[68a1d2f] | 35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.