Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: View not added to this instance. #2187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CatchABus wants to merge 2 commits into NativeScript:master from CatchABus:master
Closed

fix: View not added to this instance. #2187

CatchABus wants to merge 2 commits into NativeScript:master from CatchABus:master

Conversation

@CatchABus
Copy link

@CatchABus CatchABus commented Jun 29, 2020
edited
Loading

PR Checklist

What is the current behavior?

When pressing 'back' to exit application, an Activity-related exception is thrown.
This behaviour is also met when creating a basic angular application using 'tns create'.
So far, it's confirmed in android platform.

What is the new behavior?

Exception issues will be fixed using a small hack. It would be great if AppHostView parent behaviour was improved in the future.

Fixes: NativeScript/NativeScript#8667

@CatchABus CatchABus changed the title (削除) fix: https://github.com/NativeScript/NativeScript/issues/8667 (削除ここまで) (追記) fix: View not added to this instance. View: ProxyViewContainer(8) CurrentParent: Page(4) ExpectedParent: AppHostView(1) (追記ここまで) Jun 29, 2020
@CatchABus CatchABus changed the title (削除) fix: View not added to this instance. View: ProxyViewContainer(8) CurrentParent: Page(4) ExpectedParent: AppHostView(1) (削除ここまで) (追記) fix: View not added to this instance. (追記ここまで) Jun 29, 2020
Copy link
Author

CatchABus commented Jun 30, 2020
edited
Loading

This fix helps page-router-outlet remove the temporary presence of a component from AppHostView.
This occurs when page-router-outlet is the direct child of root view.
My '_addView' addition cooperates with the following line to ensure that component is passed from one parent to another with success: https://github.com/NativeScript/nativescript-angular/blob/master/nativescript-angular/router/page-router-outlet.ts#L374

I tested it and had no issues, but still I'm not an Angular expert so I ask that my contribution is tested thoroughly.

Copy link
Author

I'm closing this since NS team has done some amazing work on Angular, including a fix for this issue.

NathanWalker reacted with heart emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Error destroy activity when I close the app with the back button

1 participant

AltStyle によって変換されたページ (->オリジナル) /