- 
 
- 
  Notifications
 You must be signed in to change notification settings 
- Fork 240
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(detached-loader): completely deatch components #2257
Conversation
Just updated to 10.1.3 and tested, unfortunately it doesn't fix #2256 I'm still facing the same issue
@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.
@NathanWalker no worries, what do you think caused this issue?
Turns out this is my bad. I forgot to handle the way the component is created using an external factory (
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.
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:
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 a
OnPushcomponent would not be CD.This approach mimics the
@angular/cdkapproach (portals and DomPortalOutlet).This doesn't fix the root cause of #2256, but should fix most of the issues until the root is fixed (
createComponentfunction of ViewContainerRef).Fixes #2256.