diff --git a/nativescript-angular/router/page-router-outlet.ts b/nativescript-angular/router/page-router-outlet.ts index 65e353ceb..a1481e2e4 100644 --- a/nativescript-angular/router/page-router-outlet.ts +++ b/nativescript-angular/router/page-router-outlet.ts @@ -423,9 +423,7 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire if (modalNavigation > 0) { // Modal with 'primary' p-r-o outlet = this.locationStrategy.findOutletByModal(modalNavigation); } else { - const pathByOutlets = this.locationStrategy.getPathByOutlets(topActivatedRoute); outlet = this.locationStrategy.findOutletByKey(outletKey); - outlet = outlet || this.locationStrategy.findOutletByOutletPath(pathByOutlets); } // Named lazy loaded outlet. @@ -436,6 +434,9 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire if (outlet) { outlet.outletKeys.push(outletKey); } + } else if (!outlet) { + const pathByOutlets = this.locationStrategy.getPathByOutlets(topActivatedRoute); + outlet = this.locationStrategy.findOutletByOutletPath(pathByOutlets); } return outlet;