angular-ui / angular-ui/ui-router

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.

未關閉
#3,829 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
stale
主要語言
TypeScript
星號
13.4k
分支
2.9k
PR 合併指標
30 天內沒有已合併 PR

描述

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.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。