You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
Consider two routes with a master / detail pattern like /crisis-center and /crisis-center/:id.
Launch preview in a separated window to be able to change manually the URL
Click on item 2 of crisis list
Open console and clear its ouput
Change URL directly in the browser bar to go '/crisis-center/'
Check the console output and the multiple "Navigation start" event to '/crisis-center/' even after first redirection
Repeat the test but instead of changing the URL, click on "Go To Crisis Center Home" link above the list to see that it's working when navigating programmatically
What is the motivation / use case for changing the behavior?
I described a very simple example of the bug but I have currently a use case where this behaviour is very difficult to deal with, for a quite simple feature.
Environment
Angular version: 4.3.1
Browser:
- [x] Chrome (desktop) version 60
For Tooling issues:
- Node version: v6.11.1
- Platform: Linux
The text was updated successfully, but these errors were encountered:
I'm submitting a...
Current behavior
Consider two routes with a master / detail pattern like
/crisis-center
and/crisis-center/:id
.You might want to redirect the master path to a particular
id
. This can be done inCrisisCenterHomeComponent
, like so:Or with a
CanActivate
guard:Both solution work but when changing the URL manually in the browser URL bar, router triggers two navigation events:
Expected behavior
Router should trigger only one navigation event, as it does when navigating programmatically (meaning not changing manually the URL).
Minimal reproduction of the problem with instructions
Demo with component redirection
Demo with guard redirection
Steps to reproduce:
What is the motivation / use case for changing the behavior?
I described a very simple example of the bug but I have currently a use case where this behaviour is very difficult to deal with, for a quite simple feature.
Environment
The text was updated successfully, but these errors were encountered: