Questions tagged [ngrx-effects]
Use this tag for questions related to the effects package of the ngrx platform.
ngrx-effects
955
questions
0
votes
0
answers
6
views
How to pass StoreEffects to children routes using provideEffects?
I have this code:
export const PROJECT_ROUTES: Routes = [
{
path: '',
component: FeatureShellComponent,
providers: [
provideEffects([
MyStore1Effects,
...
2
votes
0
answers
100
views
Unable to use ngrx effect with MSAL protected resources and getting error, acquireTokenSilent failing
In my angular 17 app, I'm using ngrx with Msal 3.0 with Azure B2C authentication. There is an API end point which requires authentication and present in the protected resources of msal config like ...
0
votes
2
answers
42
views
How to do a redirect after getting the result?
I am using ngrx in angular. I want to make it so that after loading an array of images redirection is performed.But I don't work redirection and get this error Error: Effect "CreateRequestEffects....
-1
votes
1
answer
44
views
Angular Redux creating memory leaks
My angular application has to load updates from the backend 20 messages/sec. For this, we load all entities (Assets) from the backend as a snapshot at the start and then get incremental updates say 20 ...
1
vote
2
answers
50
views
handling multiple api calls in ngrx effects through switchmap
I am trying to execute multiple API calls in ngrx effect using switchmap
The action takes input array of files to be uploaded and api supports one file at a time
My effect look like below
uploadFiles$ ...
2
votes
1
answer
117
views
Ngrx dependency injection issue with esbuild/build-angular:application
After upgrading from Angular 16 to Angular 17, change the Angular builder to use the esbuild builder: @angular-devkit/build-angular:browser -> @angular-devkit/build-angular:application. When I ...
0
votes
0
answers
33
views
One FormControl becomes invalid after submit
I have a reactive form initialized by the OnInit interface, which takes the values from the store patching the form with them. When I submit the form, I dispatch an action bound to an effect that ...
0
votes
1
answer
60
views
Angular 15 Ngrx store/effects
I tried for a while now and many different things but i just cant find a solution why this
constructor(protected subjectService: SubjectsService,
protected userService: UsersService,
...
0
votes
1
answer
22
views
Empty object is getting passed to post method while using NgRx
I'm new to NgRx and I'm trying to call the post method of my service using NgRx. I'm passing in a booking object but I get an error saying an empty object was passed. In the Redux DevTools I can see ...
0
votes
1
answer
63
views
How to stop NgRx effect if NgRx state already have the data in Angular
I am using #angular ngrx to make a http call to store the data in the state. Now, I want to stop the callout if ngrx state already have the data using RxJs like takeuntil etc.
Can someone please help ...
0
votes
1
answer
36
views
Trying to use NgRx in my project but getting an error around this.store.select method
I'm trying to learn NgRx and I'm getting this error on 'selectAllBookings':
public allBookings = this.store.select(selectAllBookings);
Overload 1 of 9, '(mapFn: (state: object) => Booking[]): ...
0
votes
1
answer
58
views
Why I am unable to emit reducer function from an effect?
login$ = createEffect(() => {
return this.action$.pipe(
ofType(fromActions.loginStart),
exhaustMap(action => {
return this.authService
.login({
...
5
votes
6
answers
2k
views
node modules error: Type parameter 'OT' has a circular constraint
Getting error while run: ng serve
error:
Error: node_modules/@ngrx/effects/src/effect_creator.d.ts:12:43 - error TS2313: Type parameter 'OT' has a circular constraint.
12 }, DT extends DispatchType&...
0
votes
2
answers
150
views
NgRx does not trigger selector after state change
I am setting up NgRx in an Angular 16 project using Standalone components. I'm going crazy trying to have a piece of state automatically update the component after an API call is made.
I have defined ...
0
votes
2
answers
55
views
NgRx get data from api but not storing it to state
I am having problem in understanding one basic concept in ngrx implementation. One example is, I need some data to get from api to validate some information in my component but I may not need it after ...