-
Notifications
You must be signed in to change notification settings - Fork 4
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
Usage with Angular HttpClient? #45
Comments
I've managed to get it working with this StackOverflow answer: |
Can you share your complete setup in a repo? 🙂 |
@faragos here you go: It's pretty bare bones, but you should to be able to get started from here. Please note that I've been using Angular 14 in this repo. ngrx-rtk-query doesn't officially support Angular 14, so you'll have to either force install it, or downgrade Angular version. |
I'm submitting a...
Current behavior
I've been trying to figure out how to use this library with Angular HttpClient, so I can use interceptors for error handling, JWT etc.
Rest of the code looks like in the examples you provide in the docs.
I know my example code is kinda messy, but the main problem is this error thrown during runtime:
From what I understand, my code runs before the HttpClientModule is properly instantiated, and therefore there is no HttpHandler in the injected HttpClient instance.
I'm quite new to Angular and after trying different approaches I couldn't find a workaround for this. Do you think there is a viable way to use ngrx-rtk-query with HttpClient?
I will try to make a minimal app in StackBlitz and add it later.
The text was updated successfully, but these errors were encountered: