pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/NativeScript/nativescript-angular/pull/2279

e0effdbc74.css" /> fix: Cannot reattach ActivatedRouteSnapshot created from a different … by edusperoni · Pull Request #2279 · NativeScript/nativescript-angular · GitHub
Skip to content

fix: Cannot reattach ActivatedRouteSnapshot created from a different …#2279

Draft
edusperoni wants to merge 1 commit into
NativeScript:masterfrom
edusperoni:activated-route-fix
Draft

fix: Cannot reattach ActivatedRouteSnapshot created from a different …#2279
edusperoni wants to merge 1 commit into
NativeScript:masterfrom
edusperoni:activated-route-fix

Conversation

@edusperoni
Copy link
Copy Markdown
Collaborator

…route

PR Checklist

What is the current behavior?

Navigating between sibling routes may sometimes mess with the cache due to it using the key of a parent route, instead of the complete route.

What is the new behavior?

This now uses the correct key from the farthest children of the route

PARTIALLY Fixes #1993. (this issue has 2 problems on it: 1 is the one fixed in this PR, the other is that route guard/resolvers don't work on back navigation and may break navigation for a PRO)

@cla-bot cla-bot Bot added the cla: yes label Oct 19, 2020
@edusperoni
Copy link
Copy Markdown
Collaborator Author

Please don't merge this yet, as it seems it might not fully solve the issue

@jcarolus
Copy link
Copy Markdown

@edusperoni @NathanaelA
When debugging this issue in the use case Root => A => B, then back to A it looks like all keys to store/retrieve are generated correctly (also without this fix), but the error is still thrown.
The expression that causes the error to be thrown (curr.value.routeConfig !== result.value.routeConfig in https://github.com/angular/angular/blob/3817e5f1dfeb9de26fa2ea4068a37565f435214f/packages/router/src/create_router_state.ts#L52) will actually show equal properties and values when inspecting, but are not the same object reference. This only occurs with lazy loaded modules (if changed to "regular" route configs it works).
Perhaps the solution direction for this part of the issue is to either use a "deepEqual" instead of reference equality or to somehow make sure that the routeConfig reference stays the same for lazy loaded modules.
Hope this helps, cheers.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot reattach ActivatedRouteSnapshot created from a different route

2 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy