Skip to content

Commit 616c4c2

Browse files
committed
fix: use ViewUtils to add Component to Page
Without this the Page and componentView doesn't get the proper relation for then the page is destroyed.
1 parent 493d062 commit 616c4c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nativescript-angular/router/page-router-outlet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire
359359
// Remove it from original native parent.
360360
this.viewUtil.removeChild(componentView.parent, componentView);
361361
// Add it to the new page
362-
page.content = componentView;
362+
this.viewUtil.insertChild(page, componentView);
363363

364364
page.on(Page.navigatedFromEvent, (<any>global).Zone.current.wrap((args: NavigatedData) => {
365365
if (args.isBackNavigation) {

0 commit comments

Comments
 (0)