Skip to content

ResolvePolicy NOWAIT does not behave as expected #3243

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

Closed
aj-dev opened this issue Jan 4, 2017 · 3 comments
Closed

ResolvePolicy NOWAIT does not behave as expected #3243

aj-dev opened this issue Jan 4, 2017 · 3 comments
Labels
Milestone

Comments

@aj-dev
Copy link
Contributor

aj-dev commented Jan 4, 2017

According to the API docs, NOWAIT should not wait for promise and should not unwrap it. This is not the case as you can see in this plunker.

data is already resolved in onEnter hook where a resolved value is injected and not a promise. The same with the bound value in a template - it doesn't render until the data is resolved and promise unwrapped.

It contradicts the API docs stating that for resolve policy async: NOWAIT "The promise will not be unwrapped. The promise itself will be provided when the resolve is injected or bound elsewhere."

Related to #2691

@christopherthielen
Copy link
Contributor

Agreed, this needs to be fixed.

@christopherthielen
Copy link
Contributor

Will be fixed in rc.1: https://plnkr.co/edit/2kOzXARHMEi1PQfPnLHK?p=preview

@christopherthielen christopherthielen added this to the 1.0.0-beta.4 milestone Jan 7, 2017
@christopherthielen
Copy link
Contributor

Fixed by ui-router/core@05d4c73
and cb57ce9

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

2 participants