Fix unused variable in app.component.ts

This commit is contained in:
Matteo Gheza 2023-08-30 12:51:52 +02:00
parent 17b662568c
commit b36c886068
2 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,9 @@ import { Router, NavigationEnd } from '@angular/router'
export class LocationBackService {
private history: string[] = [];
constructor(private router: Router, private location: Location) {
constructor(private router: Router, private location: Location) { }
initialize() {
this.router.events.subscribe((event) => {
if (event instanceof NavigationEnd && !event.urlAfterRedirects.includes('login')) {
this.history.push(event.urlAfterRedirects);

View File

@ -32,6 +32,7 @@ export class AppComponent {
public guard: AuthorizeGuard
) {
this.revision_datetime_string = new Date(versions.revision_timestamp).toLocaleString(undefined, { day: '2-digit', month: '2-digit', year: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' });
this.locationBackService.initialize();
}
loadAlerts() {