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