Skip to content

fix(router): fix navigation when clearing history and navigating before the navigatedTo event fires #100

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

Merged
merged 2 commits into from
Nov 30, 2022

Conversation

edusperoni
Copy link
Collaborator

PR Checklist

What is the current behavior?

When navigating with clearHistory, we delay clearing the history until navigatedTo fires so the previous page doesn't become blank before the navigation animation finishes. This has a side-effect that if we quickly navigate the cache clear might happen after the next navigation, clearing the cache in a wrong way.

What is the new behavior?

We now force clear the cache on route detach or deactivate if it hasn't been cleared yet, before any other cache manipulation has happened

@nx-cloud
Copy link

nx-cloud bot commented Nov 28, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit e9ce80c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@edusperoni edusperoni merged commit f276f56 into main Nov 30, 2022
@edusperoni edusperoni deleted the fix/quick-navigation-clear-history branch November 30, 2022 17:32
NathanWalker pushed a commit that referenced this pull request Nov 30, 2022
…re the navigatedTo event fires (#100)

* fix(router): fix navigation when clearing history and navigating before the navigatedTo event fires

* fix: mark cache for clearing for better consistency
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.

2 participants