diff --git a/frontend/src/app/_services/locationBack.service.ts b/frontend/src/app/_services/locationBack.service.ts index e3094bf..ace583e 100644 --- a/frontend/src/app/_services/locationBack.service.ts +++ b/frontend/src/app/_services/locationBack.service.ts @@ -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); diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index 962c882..ecccb35 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -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() {