From 79dad5dfb010a9f3bc683f6808e6441f1ee23fcc Mon Sep 17 00:00:00 2001 From: "noemi.kallweit" Date: Mon, 27 Jul 2026 22:19:13 +0200 Subject: [PATCH] fix(news-details): change navigation to always go back to news list --- webapp/src/app/modules/news-detail/news-detail.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/webapp/src/app/modules/news-detail/news-detail.component.ts b/webapp/src/app/modules/news-detail/news-detail.component.ts index dd3e4b99..8d9448a1 100644 --- a/webapp/src/app/modules/news-detail/news-detail.component.ts +++ b/webapp/src/app/modules/news-detail/news-detail.component.ts @@ -6,7 +6,6 @@ import { ViewChild, inject, } from '@angular/core'; -import { Location } from '@angular/common'; import { HttpClient } from '@angular/common/http'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { MatButtonModule } from '@angular/material/button'; @@ -66,7 +65,6 @@ export class NewsDetailComponent implements OnInit { private readonly route = inject(ActivatedRoute); private readonly httpClient = inject(HttpClient); private readonly worksService = inject(WorksService); - private readonly location = inject(Location); private readonly sanitizer = inject(DomSanitizer); article: NewsArticleDetail | null = null; @@ -150,7 +148,7 @@ export class NewsDetailComponent implements OnInit { } navigateBack(): void { - this.location.back(); + this.router.navigate(['/news']); } formatDate(dateStr?: string | null): string {