Skip to content

Hash and view is not sync when pressing on back button #2723

Closed
@samithaf

Description

@samithaf

Hi guys,
I have came across this issue while trying to create a auth interceptor. Here is the use case.
Flow:

  1. User navigate to a screen which user does not have rights to view (Assume state1).
  2. $transitions.onBefore hook detect the navigation and send the user back to the error page
  3. User click the browser back button.

Expected behaviour:
User should not be able to navigate to the state 1
URL should not update to state 1 url.

What really happens:
User cannot navigate to state 1
URL has been update to state 1 url.

Here is a small App which replicate the issue. Please see the console log which output the current Hash
Example

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions