Movatterモバイル変換


[0]ホーム

URL:


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(detached-loader): completely deatch components#2257

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@edusperoni
Copy link
Collaborator

PR Checklist

What is the current behavior?

Detached Loader (DetachedContainer) creates components in place, attaching to a detached ProxyViewContainer and then moving the native views to their appropriate position:

Application|----AppComponent|      |---------- Component1|                       |---------- ListView1|                       |---------- DetachedContainer (not actually added to the DOM!)|                                        |---------- ModalView/ListView item/etc (Ng view attached to DetachedContainer, native view attached to modal window/ListView1)

What is the new behavior?

Detached Loader will instantiate components without adding them to the DOM at all, but instead attaching the angular view to the ApplicationRef (enabling change detection). This also fixes issues where modals opened inside aOnPush component would not be CD.

This approach mimics the@angular/cdk approach (portals and DomPortalOutlet).

Application|----AppComponent|      |---------- Component1|                       |---------- ListView1|                       |---------- DetachedContainer (not actually added to the DOM! Here for compatibility reasons)|--- ModalView/ListView item/etc (native view attached to modal window/ListView1)

This doesn't fix the root cause of#2256, but should fix most of the issues until the root is fixed (createComponent function of ViewContainerRef).

Fixes#2256.

bellalMohamed reacted with thumbs up emojibellalMohamed reacted with hooray emojibellalMohamed reacted with heart emojibellalMohamed reacted with rocket emoji
@cla-botcla-botbot added the cla: yes labelSep 20, 2020
@NathanWalkerNathanWalker merged commit623d2f7 intoNativeScript:masterSep 21, 2020
@bellalMohamed
Copy link
Contributor

Just updated to 10.1.3 and tested, unfortunately it doesn't fix#2256 I'm still facing the same issue

@NathanWalker
Copy link
Contributor

@bellalMohamed that issue was closed by accident upon merging - 10.1.3 only fixes a modal binding issue as well as the ngIf ordering issue - we’re still investigating that final issue with navigation but anticipate it being solved by Tuesday.

bellalMohamed reacted with thumbs up emoji

@bellalMohamed
Copy link
Contributor

@NathanWalker no worries, what do you think caused this issue?

@edusperoni
Copy link
CollaboratorAuthor

Turns out this is my bad. I forgot to handle the way the component is created using an external factory (

returnthis.containerRef.createComponent(factory,this.containerRef.length,this.containerRef.injector,null);
).

Oops.

I'll get to it first thing in the morning. The reason modal worked and navigation didn't is because navigation calls that function specifically to create pages.

NathanWalker and bellalMohamed reacted with thumbs up emoji

Sign up for freeto 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.

Two-way data binding stops working after navigation on IOS

3 participants

@edusperoni@bellalMohamed@NathanWalker

[8]ページ先頭

©2009-2025 Movatter.jp