From 4b730826f8ea8410264442aae6ce77336914b9b7 Mon Sep 17 00:00:00 2001 From: Stoyan Stratev Date: Wed, 18 Dec 2019 12:07:01 +0200 Subject: [PATCH] Update page-router-outlet.ts --- nativescript-angular/router/page-router-outlet.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nativescript-angular/router/page-router-outlet.ts b/nativescript-angular/router/page-router-outlet.ts index 34ba4446f..2e7ac3cbf 100644 --- a/nativescript-angular/router/page-router-outlet.ts +++ b/nativescript-angular/router/page-router-outlet.ts @@ -348,13 +348,13 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire this.changeDetector.markForCheck(); this.activated = loaderRef.instance.loadWithFactory(factory); - this.loadComponentInPage(page, this.activated); + this.loadComponentInPage(page, this.activated, { activatedRoute }); this.activated[loaderRefSymbol] = loaderRef; } @profile - private loadComponentInPage(page: Page, componentRef: ComponentRef): void { + private loadComponentInPage(page: Page, componentRef: ComponentRef, navigationContext): void { // Component loaded. Find its root native view. const componentView = componentRef.location.nativeElement; // Remove it from original native parent. @@ -393,6 +393,7 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire create() { return page; }, + context: navigationContext, clearHistory: navOptions.clearHistory, animated: navOptions.animated, transition: navOptions.transition