Closed spider9375 closed 1 month ago
This can be done using Angular's runInInjectionContext
API.
I demonstrated it here:
https://github.com/reduxjs/angular-redux/pull/13
But explicitly included a demo for reference here:
https://github.com/reduxjs/angular-redux/tree/main/projects/angular-redux-injector-demo/src
I know this API isn't super ideal, but it's stable and type-safe, so it should be fine for now. If anyone has any ideas for an API that improves on this, let me know and I'll happily consider it 😊
basically the title. Trying to find a way to create an abstraction of createAsyncThunk that has angular's injection context inside, so i can inject services and make api calls