From 6969fb3f6ad4ad275ced02d1f126119a3ac6a2bc Mon Sep 17 00:00:00 2001 From: Jiri Pokorny Date: Fri, 5 Apr 2024 19:00:09 +0200 Subject: [PATCH] Fixed navigation to planner from diff --- projects/planner/src/app/diff/diff.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/planner/src/app/diff/diff.component.ts b/projects/planner/src/app/diff/diff.component.ts index 41b81a90..f91a16f0 100644 --- a/projects/planner/src/app/diff/diff.component.ts +++ b/projects/planner/src/app/diff/diff.component.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { Location } from '@angular/common'; +import { Router } from '@angular/router'; import { ProfileComparatorService } from '../shared/diff/profileComparatorService'; import { faExclamationCircle } from '@fortawesome/free-solid-svg-icons'; @@ -11,10 +11,10 @@ import { faExclamationCircle } from '@fortawesome/free-solid-svg-icons'; export class DiffComponent { public readonly exclamation = faExclamationCircle; - constructor(public diff: ProfileComparatorService, private location: Location) { + constructor(public diff: ProfileComparatorService, private router: Router) { } - public goToDashboard(): void { - this.location.go('/'); + public async goToDashboard(): Promise { + await this.router.navigate(['/']); } }