Skip to content

Commit d993e24

Browse files
authored
Merge pull request #2100 from NativeScript/lini/add-navigation-context-to-frame
feat: add context to frame navigation
2 parents 4e9ac6a + 4b73082 commit d993e24

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: nativescript-angular/router/page-router-outlet.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,13 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire
348348
this.changeDetector.markForCheck();
349349

350350
this.activated = loaderRef.instance.loadWithFactory(factory);
351-
this.loadComponentInPage(page, this.activated);
351+
this.loadComponentInPage(page, this.activated, { activatedRoute });
352352

353353
this.activated[loaderRefSymbol] = loaderRef;
354354
}
355355

356356
@profile
357-
private loadComponentInPage(page: Page, componentRef: ComponentRef<any>): void {
357+
private loadComponentInPage(page: Page, componentRef: ComponentRef<any>, navigationContext): void {
358358
// Component loaded. Find its root native view.
359359
const componentView = componentRef.location.nativeElement;
360360
// Remove it from original native parent.
@@ -393,6 +393,7 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire
393393
create() {
394394
return page;
395395
},
396+
context: navigationContext,
396397
clearHistory: navOptions.clearHistory,
397398
animated: navOptions.animated,
398399
transition: navOptions.transition

0 commit comments

Comments
 (0)