blob: 154a0d7dc33759fea9ca3343f2b10288a6b997b4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import { Component, OnInit } from '@angular/core';
import { Location } from '@angular/common';
import { AuthService } from '../../_services/auth.service';
import shared from 'src/app/Shared';
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.css']
})
export class NavbarComponent implements OnInit {
currentUrl: string;
shared = shared;
constructor(public location: Location, private auth: AuthService) {
this.currentUrl = this.location.path();
this.location.onUrlChange(() => {
this.currentUrl = this.location.path();
})
this.shared.loggedIn = auth.isAuthenticated();
}
ngOnInit(): void {
}
}
|