Questions tagged [angular-ngrx-data]

John Papa and Ward Bell's Zero Ngrx Boilerplate - You may never write an action, reducer, selector, effect, or HTTP dataservice again.

120 questions
1
vote
2 answers

Combining Input/Service Data in Component

I have an angular component which gets data from an @Input variable and uses this to filter additional data from a service. The (simplified) structure looks like this: <..>
opp
  • 1,010
  • 10
  • 17
1
vote
2 answers

In page refresh: ngrx store dispatch issue with guard canactivate

i don't have an login page , this is sso call In the app component, I have dispatched an action to load the server-side token call and get the token and based on the user roles I can activate the guard in routing. if guard activates return true, I…
1
vote
1 answer

Why am I getting multiple selector results?

I am currently dispatching an event to retrieve all data from the backend, and with this dispatch I popularize the state copy. So far so good, the problem is if there is nothing on the backend that I would need to dispatch an event to create the…
user11472365
1
vote
1 answer

Ngrx Data GetAll and modify path

I am completely new to Ngrx Data and am trying to modify the url for a get request. So I have a Roles app that provides a manager the ability to give users roles and am needing to retrieve all of the user permissions based on application id and…
Godrules500
  • 467
  • 6
  • 25
1
vote
1 answer

Angular nested components data flow with NGRX-Data

I have a two components whith a shared service and the service is connected to an NGRX Data store. The Button-Component triggers a request via the service by calling the getByKey() method of NGRX-Data. The Display-Component has an Observable which…
CodeChimpy
  • 560
  • 1
  • 6
  • 26
1
vote
0 answers

How to override the default reducer implementation for an entity in ngrx/data

I am trying to do the pagination using ngrx/data. In the initial request, the page size is 10 and pageNumber is 1. When I am triggering the second request with page size 10 and page number 2. It is truncating the older value and saving the values…
Aniket Rai
  • 13
  • 1
  • 4
1
vote
1 answer

@ngrx/data - Undoing an optimistic delete, should an UNDO_ONE action revert the changeState?

Stackblitz In @ngrx/data doing an optimistic delete (of our Hero "Ant-Man") causes changeState to be updated as shown below: { "entityCache": { "Hero": { "ids": [1, 2, 3, 5, 6], "entities": { "1": { "id": 1, …
Andrew Allen
  • 6,512
  • 5
  • 30
  • 73
1
vote
1 answer

Ngrx/data appears to interfere with reducers

I'm fairly new to Ngrx so I'm assuming that I'm doing something wrong. It appears that if Ngrx/data is active then it interferes with the state history resulting in reducers being called with undefined initial states. This is apparent if I have…
Elric Pedder
  • 73
  • 1
  • 5
1
vote
0 answers

What does this typescript assignment do?

protected services: { [name: string]: EntityCollectionDataService } = {}; I see it assigning an object literal to the services, but the [] assignment is unclear especially on the right side of the expression.
Sherum
  • 63
  • 7
0
votes
0 answers

How can I access and update an additional field in the EntityCollectionState of NgRx Data?

I'm trying to add a new field called totalElements to the entity collection state in NgRx Data. This field represents the total number of rows returned by a backend table. I've gone through the instructions on how to add this field in the official…
ibap
  • 1
0
votes
1 answer

Actions not triggering subsequent actions

Github link to my sample program. in file app.component.ts created a session expiry action which will be triggered once timeout happens timerExpiration : setTimeout(() => { this.store.dispatch(SessionActions.expirationTimerElapsed()) …
theRoot
  • 571
  • 10
  • 33
0
votes
2 answers

how to pass custom value in ngrx

this is .ts file where addValue() got error as : Expected 0 arguments, but got 1 value: any name: string = '' constructor(private store: Store<{ counter: CounterState }>) { } ngOnInit() { //…
0
votes
0 answers

Angular @ngrx/data custom data service how to inject another entity?

I add @ngrx/data in my application. My problem is I have to get data from other entities as well to add to the HTTP call. My code is like export class ReportsModule { entityMetaDataMap: EntityMetadataMap = { FormAData: { }, …
e.k
  • 1,333
  • 1
  • 17
  • 36
0
votes
1 answer

NGRX - How to subscribe to multiple requests that update a list, but prevent it from loading multiple times on the first load?

I'm working with Angular-NGRX and i have 3 components that can modify the data of a list. In the main component I listen for all the changes to update the listing and it works. The problem is that the first load subscribes me 3 times. This is the…
0
votes
0 answers

ngrx/data User EntityAction guard for "[User] @ngrx/data/save/add-one/success": payload has a missing or invalid entity key (id)

When I dispatch an Add-Action my Backend is updated and so is my Frontend (due to optimisticAdd: true). But I still get this Error: I debugged everything and found the place where the error happens: The function mustBeEntity(action){...} is called…
Janka C.
  • 13
  • 3