improve go back

This commit is contained in:
Peter Maquiran
2022-01-06 14:47:22 +01:00
parent be06d3b3d1
commit 73354e00af
28 changed files with 153 additions and 58 deletions
+4 -1
View File
@@ -6,7 +6,10 @@ import { Router, NavigationEnd } from '@angular/router'
export class NavigationService {
private history: string[] = []
constructor(private router: Router, private location: Location) {
constructor(
private router: Router,
private location: Location
) {
this.router.events.subscribe((event) => {
if (event instanceof NavigationEnd) {
this.history.push(event.urlAfterRedirects)