-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Using {location: 'replace'} to go back to the previous state should pop history instead of creating two identical entries #1590
Comments
+1 |
+2 |
Our current handling of history is not very sophisticated. If you feel like working on a PR, let me know. Here, I already got you started: http://plnkr.co/edit/DJH6mQUCbTFfSbdCBYUo?p=preview |
Any news on this ? |
Should a state transition ever assume a "back" operation? |
+1 |
1 similar comment
👍 |
👍 |
This issue has been automatically marked as stale because it has not had This does not mean that the issue is invalid. Valid issues Thank you for your contributions. |
Here's an example plunker (launch the preview in a separate window to see the history).
/state0
./state0
,/state0/state1
./state0
,/state0/state1
,/state0/state1/state2
.Go back
button (which uses{location: 'replace'}
) to go back to state1. History is now/state0
,/state0/state1
,/state0/state1
, with duplicate/state0/state1
.I think a better behavior is to remove the duplicate state from history when this happens. The current behavior breaks the browser back button (now you have to click back twice to go back to state0).
The text was updated successfully, but these errors were encountered: