From 298ad367a30a75be387199d9aca30a9e0dfbe83a Mon Sep 17 00:00:00 2001 From: TheDiaval Date: Thu, 8 Aug 2019 17:30:26 +0300 Subject: [PATCH] fix(core): redirect user to child routes instead of module root route --- .../core/src/lib/components/dynamic-layout.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts b/npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts index 0504da38b4..30852429f5 100644 --- a/npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts +++ b/npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts @@ -54,7 +54,7 @@ function findLayout(segments: UrlSegment[], routes: ABP.FullRoute[]): eLayoutTyp layout = route.layout; } - if (route.children && route.children.length) { + if (route.children && route.children.length && segments.length > 1) { const child = route.children.find(c => c.path === segments[1].path); if (child.layout) {