Revision 51194
Added by Myrto Koukouli about 6 years ago
home.component.ts | ||
---|---|---|
1 | 1 |
import {Component, OnInit} from '@angular/core'; |
2 | 2 |
import {AuthenticationService} from '../../services/authentication.service'; |
3 |
import { ActivatedRoute, Router } from '@angular/router'; |
|
3 | 4 |
|
4 | 5 |
@Component ({ |
5 | 6 |
selector: 'app-home', |
... | ... | |
9 | 10 |
export class HomeComponent implements OnInit { |
10 | 11 |
isLoggedIn: boolean; |
11 | 12 |
|
12 |
constructor(private authService: AuthenticationService) { } |
|
13 |
constructor(private authService: AuthenticationService, private router: Router, private route: ActivatedRoute) { }
|
|
13 | 14 |
|
14 | 15 |
ngOnInit() {} |
15 | 16 |
|
17 |
callTopMenu() { |
|
18 |
setTimeout( () => { |
|
19 |
this.router.navigate(['/sources/register'], {relativeTo: this.route}); |
|
20 |
}, 500); |
|
21 |
} |
|
16 | 22 |
} |
Also available in: Unified diff
almost finished login