-
Notifications
You must be signed in to change notification settings - Fork 3k
It should be possible to disable promise-unwrapping for resolves #2691
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
Comments
A while ago we started making the under-the-hood changes necessary to allow templates to be rendered up-front while delaying controller instantiation, so that we could provide some sugar for progressive rendering, but maybe this is a better approach... Seems like it should be implementable with a new resolve policy. Check out |
This seems like a reasonable request and should be pretty easy to achieve. Resolve Policy defines how the resolve blocking code works. I'm planning on removing We could implement a The touch points for this are in |
Implemented as .state('foo' {
resolve: { data: ($timeout) => $timeout(1000).then(() => 'data') },
resolvePolicy: { async: 'NOWAIT' }
}); |
Hmm this should be closed I guess |
I've been trying the 1.0-alpha with ng1. I'm disappointed that there still seems to be no way to disable promise-unwrapping / entry-delay for resolves.
As I understand it, resolves address two separate concerns:
I don't understand why ui-router conflates these two things without any way to prevent it doing so. If I want to handle progressive-rendering myself in my components, but still have ui-router supply their dependencies, I should be able to tell ui-router to give me the un-unwrapped promises for the resolved values without delaying entry.
The text was updated successfully, but these errors were encountered: