angular-ui / angular-ui/ui-router

When resolving an onBefore promise, the previous state is removed while async resolves are still pending.

オープン
#3,827 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
stale
主要言語
TypeScript
スター
13.4k
フォーク
2.9k
PR マージ指標
30日以内にマージされた PR はありません

説明

This is a (check one box):

- [X] Bug Report

My version of UI-Router is: 1.0.28

# Bug Report

#### Current Behavior:

We can return a promise to `transitions.onBefore()`, if the promises resolves, I observe that the router starts the exit/retain/enter flow, and in turn removes the original state from the DOM.

The new state is only added after all async resolves are completed. In the mean time this leaves an empty dom or 'flickering' page.

#### Expected Behavior:

I expect the behavior to be the same to when I am not using an async onBefore, which is: Don't exit the original state until all async resolves are completed.

When returning a promise `transitions.onEnter()` the behavior is as expected. I can work with that.

If you think I am on to something here I am happy to provide a repro – otherwise feel free to ignore. Thanks for maintaining this useful project!

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。