From 8f916b9c9e8b64df4791468a58ff2ae0f50760b4 Mon Sep 17 00:00:00 2001 From: Andrii Rodzyk Date: Thu, 9 Apr 2026 15:48:43 +0300 Subject: [PATCH] fix(router): add pathMatch to root route and update URL extraction logic in LinkInitFacade --- src/app/app-routing.module.ts | 2 +- .../link-parser/ui/parser-form/facades/link-init.facade.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index defa330..333630f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -78,7 +78,7 @@ function getPairRoutesToCompare(map: Map) { } const routes: Routes = [ - { path: '', loadChildren: linkParserMod }, + { path: '', loadChildren: linkParserMod, pathMatch: 'full' }, { path: LIST_PATH, loadChildren: () => import('./list/list.module').then(m => m.ListModule) }, ...getPairRoutesToCompare(siteModulesMap), diff --git a/src/app/link-parser/ui/parser-form/facades/link-init.facade.ts b/src/app/link-parser/ui/parser-form/facades/link-init.facade.ts index 0f599d5..a76fe0d 100644 --- a/src/app/link-parser/ui/parser-form/facades/link-init.facade.ts +++ b/src/app/link-parser/ui/parser-form/facades/link-init.facade.ts @@ -10,8 +10,8 @@ export class LinkInitFacade { private linkFacade = inject(LinkParserFacade); async init() { - const routeUrl = this.route.snapshot.paramMap.get('url'); - const queryUrl = this.route.snapshot.queryParamMap.get('url'); + const routeUrl = this.route.root.firstChild?.snapshot.params['url']; + const queryUrl = this.route.root.firstChild?.snapshot.queryParamMap.get('url'); if (routeUrl) { this.linkFacade.setLink(routeUrl);