I’m new with ngrx and I want to use NgRx Data module. I’m in a stack with Angular/Symfony hosted in docker with Traefik (https mode). I want to do a request to a route named : https://xxx.xxxxxx.localhost/operations This route normally send me my list of operations with standard usage with angular service. But with NgRx Data module when I called
Tag: ngrx
Cannot assign to read only property ‘winner’ of object ‘[object Object]’
I’m encountering the error when I try to make the assignment this.contest.winner = winnerId; you see in the following code snippet: I’ve done this kind of assignment with other classes around the project and they never bothered me. I enclose the contest class and post if it is useful: I also tried some solutions always found on this forum such
Angular-Listening to store changes & emit a value from a Service component to a different component – only after Service completes certain operations
Here we have to classes GetDataAsyncService which waits for change in the store (and not executes the block of code under it until a change in the store ( this.getDataAsyncService.getAsyncData().subscribe((data)=>{ )}). When it is called from MainComponent it will get return of(propA); (from GetDataAsyncService) before the block of code in the listener is executed – because the listener is still
Getting error Effect “n.loadInfo$” dispatched an invalid action
I am trying to write an effect for an action but it is throwing an error as: “Effect “n.loadInfo$” dispatched an invalid action: null Error” I have my effect as below: I have my action defined as below: And in the service as below: I have selector as below that is used in the effect: Create reducer as below after
Can’t reinizialize ngrx’s state’s feature
I’m working with ngrx and this is my initialState: i need reinitialize the state feature. This is my reducer’s case: I’m expecting that this reducer, clean my feature state, returning it equal to the initialState. But the state dosen’t change. If i log the initialState, it is equal to the actual state The only way I can reset it is
How to display a success message NgRX Effects and dispatch events
reducer: Effect: component.ts: on click of the method, an action being dispatched and following up with an effect, my case the api call is success and an success action being dispatched as well (in my reducer I set a flag to true), right after the AddUser action being dispatched from the click method, I’m subscribing to the flag(isUserAdded) to navigate
NullInjectorError: StaticInjectorError(AppModule)[NGXLoggerHttpService -> HttpBackend]:
I keep getting the following error after upgrading my NgxLogger module: main.ts core.module.ts app.module.ts Answer You have that error because your NGXLoggerHttpService is depend on HttpBackend class but HttpBackend class did not import to your providers section in your module.ts. Try to import HttpBackend to your provider.
Action doesn’t trigger effect the THIRD time when it runs
Effects runs perfectly on first two dispatch of action but doesn’t trigger on the third time.The solution in Why action doesn’t trigger Effect the second time it runs and @ngrx Effect does not run the second time doesn’t work for me. Here’s the effect: Answer I also had a similar problem. The issue was with my reducer. In my reducer