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

replace history when $locationChangeStart is prevented #11643

@hesamwls

Description

@hesamwls

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions