John Papa and Ward Bell's Zero Ngrx Boilerplate - You may never write an action, reducer, selector, effect, or HTTP dataservice again.
Questions tagged [angular-ngrx-data]
120 questions
4
votes
1 answer
entities not getting updated in @ngrx/data
I am trying to learn @ngrx/data by creating simple TODO app
I created simple ToDoDataService to override default HTTP
@Injectable()
export class TodosDataService extends DefaultDataService {
constructor(httpClient: HttpClient,…

raju
- 6,448
- 24
- 80
- 163
4
votes
2 answers
How to use setFilter on the EntityCollectionService
I would like to know how the setFilter method works for the EntityCollectionService in @ngrx/data. The documentation hints at how it is used, but there is no example showing the actual setFilter(pattern: any) function being used. Since the…

bkelley
- 112
- 9
4
votes
0 answers
angular-ngrx-data create custom effect
I am currently using ngrx in my app to manage state. I was looking at switching to ngrx-data for the simple CRUD operations and ran across my first question. This is my current regular ngrx effect and I want to know how to reproduce it with…

samneric
- 3,038
- 2
- 28
- 31
3
votes
0 answers
NGRX/data how to modify / update additionalCollectionState
I am facing one issue and unable to resolve:
I am using ngrx data with following:
const entityMetadata: EntityMetadataMap = {
forReports: {
entityDispatcherOptions: {
optimisticUpdate: true,
},
…

Parth Developer
- 1,371
- 1
- 13
- 30
3
votes
1 answer
Does ngrx/data provide a way to define a custom base API path for my DefaultDataService and then reference that path?
I'm using Angular 13 with NgRx/data and entities (v 13). I have defined the following data service, in which I wish to override the URL used to retrieve entities ...
export class MyObjectService extends DefaultDataService {
...
…

Dave
- 15,639
- 133
- 442
- 830
3
votes
1 answer
NGRX selectors: factory selector within another selector without prop in createSelector method
Using the factory selector pattern const selectA = (id: number) => createSelector(...) I have an instance where I want to reuse this selector within another selector (that iterates through an array of IDs) but I don't know the value to pass into the…

Tr1stan
- 2,755
- 1
- 26
- 45
3
votes
2 answers
ngrx showing "Typerror: entities.reduce is not a function" error even when `entities` contains data
I'm trying to use ngrx entity dataservice for the first time
https://ngrx.io/guide/data
https://ngrx.io/guide/data/entity-dataservice
The API call is being made and I'm recieving the expected data
But when ngrx tries to proccess it it gets an…

Mauricio Gracia Gutierrez
- 10,288
- 6
- 68
- 99
3
votes
0 answers
NgrxData, How to add custom function other than the default ones in the DefaultDataService
I'm trying to build an app with NgRXData (https://ngrx.io/guide/data), and I want to add new functions in the DataService of one of the models, I understood that you only can override an existing functions that exists in the DefaultDataService…

Dabbas
- 3,112
- 7
- 42
- 75
3
votes
1 answer
how to EXTEND Custom Entity Collection Reducers in @ngrx/data
After reading and trying everything so far to update my additionalCollectionStates to my EntityCollection (based on the few infos from the docs, this SO Question, this other SO Question, another SO question and an issue from the github repository) I…

hreimer
- 785
- 8
- 31
3
votes
1 answer
Using ngrx-data how to configure the app to fetch data of specific entities from specific urls
If we follow ngrx-data example and look at the Entity DataService, we can fetch the Hero data that we have in-memory (hard-coded) without any configuration. The default will work the same as if we configured:
const defaultDataServiceConfig:…

Felix
- 1,662
- 2
- 18
- 37
3
votes
0 answers
Override @ngrx/data, @ngrx/entity Actions, Reducer, Effects
I'm new to @ngrx/data and trying to understand how I can override the reducer & actions.
My current problem could be solved in other ways like adding an extra method, reducer & action but I would probably need this answer in the future.
The problem…

Muhamed Karajic
- 53
- 1
- 5
3
votes
2 answers
@NgRx how to Many to Many relationship between entities?
Let say i have this state:
{
"appointments": {
"ids": [...],
"entities": [
"0": {
...
mandatoryRecipients: ['0','3']
},
"1": {
...
mandatoryRecipients: ['1','2','0']
…

Cristian Montini
- 76
- 4
3
votes
1 answer
NgRx Data custom URL generator
I'm new to NgRx. After preliminary research NgRx and particularly the NgRx Data package appear to be a good fit for an application I am working on. One caveat is our entities are backed by micro-services with unconventional routes.
Each entity has…

JME
- 2,293
- 9
- 36
- 56
3
votes
2 answers
NgRx Data DefaultDataServiceConfig
I just started to use NgRx Data on my project and I'm searching for a couple of hours and I can't find a solution for a problem that I'm facing with.
I'm trying to change the default root of calls by using DefaultDataServiceConfig like…

Sergiu Molnar
- 865
- 1
- 11
- 22
3
votes
1 answer
How to extend ngrx/data with Entity Effects?
When converting an application to make use of ngrx state management, I decided to manage the state of some models with ngrx/data via EntityMaps. This works fine so far, however when things get a little more complex, e.g. based on fetched model data…

hreimer
- 785
- 8
- 31