Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

replace history when $locationChangeStart is prevented #11643

Closed
hesamwls opened this issue Apr 18, 2015 · 1 comment
Closed

replace history when $locationChangeStart is prevented #11643

hesamwls opened this issue Apr 18, 2015 · 1 comment

Comments

@hesamwls
Copy link

I'm trying to cancel out all effects of unsuccessfull route in terms of Browser History.
when I call event.preventDefault() in $locationChangeStart listener, I expect the new History token replace the last one.
I mean right now for this :
Route A--->Route B(prevented)--->route C($location.replace called)
I get:
Route A->Route A
in my browser history.
but if history get replaced when I prevent locationChangeStart, I'll get:
Route A
that seems logical.
Any thoughts?

@pkozlowski-opensource
Copy link
Member

This is duplicate of #2100 - let's move the discussion in there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants