Skip to content
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

Returning a promise on a $transaction changes URL in browser but not on returning false. URL should not change until promise is rejected or resolved. #3829

Open
2 tasks
hubnerd opened this issue Apr 27, 2021 · 1 comment
Labels

Comments

@hubnerd
Copy link

hubnerd commented Apr 27, 2021

This is a (check one box):

  • [X ] Bug Report
  • Feature Request
  • General Query

My version of UI-Router is: v1.0.26

Bug Report

Current Behavior:

Currently when pressing the navigation buttons on the browser, after setting a $transition.onStart to intercept, if you return a promise the URL in the browser will change before a resolve or reject is called on the promise but if you simply return false it does not change the URL.

Expected Behavior:

Expected behaviour would be no change to the URL until promise comes back with reject or resolve. As when rejecting I do not wish the URL to change.

Link to Plunker or stackblitz that reproduces the issue:

https://embed.plnkr.co/plunk/bCTfAXLTQwsk3NkP

If you open plunker in separate window to look at URL changes. You can see when you go to foo2 and click the back button in the browser no URL changes but if you go from home to foo and click the back button on the browser the URL changes but the promise in 2 seconds is rejected.

@stale
Copy link

stale bot commented Apr 18, 2022

This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.

This does not mean that the issue is invalid. Valid issues
may be reopened.

Thank you for your contributions.

@stale stale bot added the stale label Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant