Questions tagged [ngrx-entity]

Entity State adapter for managing record collections with ngrx

@ngrx/entity provides an API to manipulate and query entity collections.

  • Reduces boilerplate for creating reducers that manage a collection of models.
  • Provides performant CRUD operations for managing entity collections.
  • Extensible type-safe adapters for selecting entity information.
177 questions
0
votes
1 answer

NgRx Data Service not triggering end point

I am trying to setup NgRx Data in sample project. The use case is to fetch Employee entities using Data Service and store them. So I defined data service, collection service and app module as below. I added All Employees button on home page which…
Pavan Jadda
  • 4,306
  • 9
  • 47
  • 79
0
votes
0 answers

Allow two feature modules to work on the same NGRX/store without overwriting

I've just started to set up an NGRX/Store based sample project. My goal was to develop independent feature modules working on the same store. Later, these modules are to be outsourced to a library so that they can be integrated independently. I…
EchtFettigerKeks
  • 1,692
  • 1
  • 18
  • 33
0
votes
1 answer

NGRX Entity: How to use it within template?

I followed a tutorial on how to implement an NGRX store with an NGRX entity. Everything seems to work (as far as I can tell using the dev-tools-extension). However, I don't know how I should/can iterate over the result in the template. The…
EchtFettigerKeks
  • 1,692
  • 1
  • 18
  • 33
0
votes
1 answer

NgRx Update entity by name is possible instead of id?

export interface **UpdateStr** { **id**: string; // need to update by name changes: Partial; } I need to update by name, instead of id
0
votes
1 answer

Entity adapter getSelectors method generates "Cannot read property 'map' of undefined" error

I am trying to use createEntityAdapter from reduxjs/toolkit to generate selectors automatically. I have created a "select all" selector successfully using create selector: export const selectEnvironmentsResult =…
Rashomon
  • 5,962
  • 4
  • 29
  • 67
0
votes
1 answer

NGRX/router select parent route data

I want to get the route data for the parent route from the current route. Is it possible? The documentation here https://ngrx.io/guide/router-store/selectors shows only how to get the route data from the current route.
Angad
  • 1,144
  • 3
  • 18
  • 39
0
votes
1 answer

Store: TypeError: Cannot read properties of undefined (reading 'ids') at selectIds

What is causing the issue in the title. I am basically getting a typeError when I try to retrieve data in a feature store module.
Eric
  • 75
  • 2
  • 5
0
votes
1 answer

Format data in store with @ngrx/data and @ngrx/entity, not in component (subscriber)

While working with ngrx/data I find myself parsing and formatting data from the store in multiple places: converting strings to date objects or formatting strings. I recently discovered filterFn which lets me fetch only the entities that are…
Florestan Korp
  • 662
  • 2
  • 12
  • 24
0
votes
0 answers

How to loop and update inner arrays with NgRx- Entity by unique ID's

I am trying to update tutor name with tutor ID as Unique for every object in tutors array. Using NgRX entity concept Update<> method in NgRX entity library Here is my data structure. let subjectDetails = [ { id: '1', title: 'Core Java Tutorial',…
0
votes
1 answer

can we register entity to global store in ngrx? is that possible?

It would be nice if we entity in our global store? I have some crud operations, which are very easily done using @ngrx/entity and I want to have it in root-store. I have tried creating an entity, but schematics did it for forFeature().
0
votes
0 answers

Ngrx Reducer/effects not triggered

I am trying a poc on ngrx , reducer is not triggered . Here is my code Action file.ts import { createAction, props } from "@ngrx/store"; import { PocInfo } from "../entity"; export const GET_POC = '[Build Call] Get Poc'; export const…
Gowtham
  • 1,557
  • 12
  • 24
0
votes
1 answer

NgRx Data service Update removes object prototype instead of updating the changed fields

When my NgRx DefaultDataService updates, it removes the type/prototype of the objects in the store. The objects are no longer of type Todo, but are simple objects with no prototype. The objects come from the server as json objects conforming to the…
0
votes
1 answer

How to order ngrx entity collection

I have a response from backend like this: [{ id: 4, name: 'Andrew'}, {id: 3, name: 'Rebecca'}, {id: 2, name: 'Joseph'}, {id: 1, name: 'Kristin'}] The order is by descending id. From the last one to first one. I have an entityAdapter defined in…
Andy88
  • 647
  • 2
  • 9
  • 21
0
votes
0 answers

NGRX entity adapter - how to update/upsert many nested properties

I am trying to update many entities using adapter.updateMany(). I have Groups entity that looks like this (There are multiple groups with multiple children): { "id": 1, "children": [ { "id": 222, "width": null, "height":…
omygoodness
  • 335
  • 3
  • 18
0
votes
1 answer

Angular resolver with Ngrx data service error

I have an NGRX Data entity service that is working, I want to preload data before accessing to a route, therefore I made a resolver. import { Injectable } from "@angular/core"; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot, }…
javifm
  • 705
  • 4
  • 9
  • 20