-
Notifications
You must be signed in to change notification settings - Fork 6
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
How to properly use resolvers #4
Comments
After tinkering I figured a way to access the API from the injected transition, however I would still be interested about how to reconcile redux with the resolvers via action creators and reducers |
Don't know if this is the recommended way however I found that dependency injection is a bad idea, on the other side resolvers can be easily reconciled with the redux store, below is an example of a simple config I'm using:
|
Is there any other way to access |
Technically yes, you can inject it into the router and use dependency injection to resolve it in the router resolve function. There might be another way perhaps by using redux
So apparently it is normal to pass the singleton around... |
Coming from the old angular I loved the resolvers in ui-router, however I'm having trouble using them with Redux. My main issue is that usually I enclose my API into a service which was then injected into the router, however with redux, I have no idea how to achieve this... A little example/demo would be very helpful
The text was updated successfully, but these errors were encountered: