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
                    
                    13
                    
            votes
                
                1 answer
            
        Im unable to get NgRx Data to trigger an API call
Im trying to set up NgRx Data with a service that overrides the EntityData getAll() function, so that i can call an API. but nothing happens when i call EntityService.getAll()
entity-metadata.ts : standard definition for the EntityMetadataMap where…
         
    
    
        Rudy
        
- 431
- 3
- 8
                    9
                    
            votes
                
                1 answer
            
        Types of parameters 'action' and 'action' are incompatible, Property 'payload' is missing In Angular ngrx
I am new to angular. Here I using ngrx to manage a state in my angular app. But when I'm compiling I got the following error. It says that 'Types of parameters 'action' and 'action' are incompatible'. I want to know the reason for this and how to…
         
    
    
        PrasadM96
        
- 571
- 2
- 6
- 15
                    9
                    
            votes
                
                3 answers
            
        create a selector for a ngrx/data entity
I have a state and I'd like to create selectors from ngrx/data entities.
import {
  Action,
  ActionReducer,
  ActionReducerMap,
  createFeatureSelector,
  createSelector,
  MetaReducer
} from '@ngrx/store';
import {environment} from…
        user12207064
                    8
                    
            votes
                
                3 answers
            
        Schematic "store" not found in collection "@schematics/angular"
I install ngrx/store with the following command :
ng add @ngrx/store 
then I want to add store
ng generate store auth/Auth --module auth.module.ts
get the following error :
An unhandled exception occurred: Schematic "store" not found…
        user13851558
                    8
                    
            votes
                
                1 answer
            
        Can we use NgRx Data with pagination style REST API response?
I am currently using NgRx Data to perform CRUD operation on couple of entities on my project. Now, I've to develop pagination. Hence, REST API response is going to be like:
{
    "page": 1,
    "per_page": 10,
    "total": 100,
    "total_page":…
         
    
    
        Kalpesh Patel
        
- 259
- 2
- 14
                    6
                    
            votes
                
                4 answers
            
        Ngrx-data select a single entity
I am using ngrx-data plugin (runs on top of ngrx), and I'm trying to select a single entity from the store (that ngrx data calls 'Cache'). I found that you can add a single entity to the cache but I can't find the way to retrieve a single item…
         
    
    
        maury844
        
- 1,210
- 15
- 25
                    6
                    
            votes
                
                1 answer
            
        ngrx/data- How can I write custom reducers to handle endpoint returning multiple entities?
I am currently trying to convert my ngrx store to use ngrx/data to handle my entities.  One of the trickier obstacles I have hit is handling API endpoints that return data for multiple entities.  A simple example- lets say I have the following…
         
    
    
        MarkD
        
- 4,864
- 5
- 36
- 67
                    6
                    
            votes
                
                4 answers
            
        ngrx/data entity data service
Trying to understand the ngrx/data entity data service example here, where it says "Creating entity data services". After showing that service, the docs go on to show how to use ngrx/data in components. The part of the component I'm interested in is…
         
    
    
        skwny
        
- 2,930
- 4
- 25
- 45
                    6
                    
            votes
                
                0 answers
            
        NgRx/Redux less duplicate code with more general reducers
I'm building an application where I have different pages with lists of movies. E.g. search page (movies by search), actor's page (movies by actor), genre's page (movies by genre). The thing is all of them share the same basic functionality - load a…
         
    
    
        Daniil Andreyevich Baunov
        
- 2,723
- 1
- 24
- 48
                    5
                    
            votes
                
                1 answer
            
        @ngrx/data - how can I extend a collection reducer / replace handling of the results of a data service call?
Using @ngrx/data I want to handle the result of the getWithQuery API call differently than the default.  
Currently if this returns an array of entities, this gets loaded in the entityCache directly. 
So far I've used the standard pattern shown in…
         
    
    
        Andrew Allen
        
- 6,512
- 5
- 30
- 73
                    5
                    
            votes
                
                1 answer
            
        NgRx Data - How to hook into a addOne success Action in a typesafe way?
I'm new to @ngrx/data and I'm going through the documentation.
Using the guide I've been able to replicate what I've previously done manually - for example using the service on this overview page, the following works calling REST-API and adding…
         
    
    
        Andrew Allen
        
- 6,512
- 5
- 30
- 73
                    4
                    
            votes
                
                2 answers
            
        How to avoid net::ERR_INSUFFICIENT_RESOURCES when ngrx/data is making remote api calls?
I am updating a lot of records under @ngrx/data, which calls a remote API in the background to sync the database and the local store.
  dataList.forEach((entity) => {
    const p = this.entitySvc
      .getEntityCollectionService(storeName)
     …
         
    
    
        ed4becky
        
- 1,488
- 1
- 17
- 54
                    4
                    
            votes
                
                0 answers
            
        How do I override/replace the DefaultDataService in NgRx and write custom API methods
Hi I'm having trouble using a custom API call with NgRx Data. I am trying to use my own custom call in the EntityService but it isn't working 
Instead of this:
getAll(): Observable {
    return this.execute('GET', this.entitiesUrl);
  }
I need… 
         
    
    
        lethalSid
        
- 51
- 3
                    4
                    
            votes
                
                2 answers
            
        How can I customize my reducers using @ngrx/data?
I am learning to use @ngrx/data, it is true that with that library I advance a lot of code, but I am having problems when it comes to personalizing it. 
I already saw how to add fields to collections
export const entityMetadata: EntityMetadataMap =…
         
    
    
        Reynier Rivero
        
- 2,042
- 2
- 8
- 12
                    4
                    
            votes
                
                1 answer
            
        Understanding capabilities of ngrx/data
I'm trying to get familiar with ngrx/data but I'm not sure about its capabilities. I've read the documentation and some tutorials but there are still a lot of question marks:
ngrx/data offers methods for CRUD functionality. But what about…
         
    
    
        chrisch
        
- 189
- 9