Skip to content

Two back button clicks needed to get back when the initial state has got a redirect  #3187

@NeoGenet1c

Description

@NeoGenet1c

UI router v1.0.0-beta.3 and angular v1.5.9

When an app loads its initial state for the first time and it contains a redirect, the transition graph looks something like following:

State A [redirected] -> State B [success]

However, if a user clicks on the back button, UI router tries to jump back to State A causing another redirect (meaning that nothing happens). In this case, transitions look like this:

State A [redirected] -> State B [ignored]

Finally, another click on the back button will send me back to wherever I was before the application/first state loaded (eg. Google's SERP).

I would expect that a first click on the back button will send a user to a previous page. This issue only occurs if the very first loaded state is a redirect - if I get to a state with a redirect through ui-sref link within my own app, the back button click will send me back right away.

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