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 Entity Effects Firestore

I am following this tutorial https://www.concretepage.com/angular-2/ngrx/ngrx-entity-example. I have now Firestore as my backend. I can retrieve 'LOAD_ALL_ARTICLES' from Firestore. But my code breaks when I try to listen for the 'ADD' action. Any…
0
votes
1 answer

NgRx + Entities + Firestore - how to deal with it when I don't want to load all entities at once?

Let's say that there are tasks and projects. Sometimes a user want to see all his/her tasks and sometimes tasks belonging to a certain project. When all tasks are loaded at the beginning all those different views may just use NgRx selectors to get…
GUZ
  • 627
  • 1
  • 9
  • 18
0
votes
2 answers

Display single ngrx entity within ngFor loop using Ids

I'm using ng6 with NGRX to display two datasets in the view. The first dataset is the complete dataset. The second dataset is an subset of the first dataset. I need to use an ngFor loop on the second dataset, which provides an id, and within the…
0
votes
0 answers

how to use httpclient get method in angular 2 and show items in list?

I am trying to use httpclient get method in angular 2 and show items in list ,But I am using ngrx with ngrxeffect(for asyn task). I make a reducer , action .I also make effect file .Now I want to call service and fetch data from service and store…
user944513
  • 12,247
  • 49
  • 168
  • 318
0
votes
1 answer

typescript ngrx type mismatch between (string|number)[] and string[]|number[]

I am trying to upgrade my angular app to 5.2.10 with other following libraries: ngrx 5.2.0 typescript: 2.6.2 tslint 5.10.0 and hitting following errors during angular compilation: ` ERROR in src/app/**/xxx-state.ts(301,5): error TS2322: Type…
Ashish Patel
  • 317
  • 1
  • 8
0
votes
1 answer

Holding 3 same type of objects in a feature store with clean separation.

I have three services that return same type of objects based on different actions. How can I hold all the objects on feature store with a clean separation. Action1: LOAD_CANDIDATES I have an effect that invokes below service call public…
0
votes
0 answers

Why does ngRx platform/effects fires un-dispatched actions?

I had a hard time finding out from where the events are dispatched. But I have noticed that the GET_USER_SUCCESS is only fired when you edit the already fetched user from server on initial load. effect.ts: //Get users this.getUsers$ =…
0
votes
1 answer

How do I merge slices of state for my presentational component properly (ngrx/store)?

I'm still trying to learn ngrx - the store is set-up and everything seems to work fine. The database I'm using is SQL so basically I'm "clongin" the tables and load them into the store but have problems joining the state in the end when selecting an…
rawk
  • 508
  • 1
  • 7
  • 13
-1
votes
1 answer

Select and update the additional property of NgRx entity using component store

I have the below additional property export interface MetricCreateState extends EntityState { isLoading: boolean | undefined, isCreated: boolean | undefined, LoadConfigureMetric: boolean | undefined } Created a…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
-1
votes
3 answers

Angular NGRX error while querying the store : TypeError: Cannot read property 'map' of undefined

I have implemented NGRX effects in my angular app and get the error below. I am not sure if I am using the selector correctly in my component to query the store ? core.js:6162 ERROR TypeError: Cannot read property 'map' of undefined at…
Tom
  • 8,175
  • 41
  • 136
  • 267
-1
votes
1 answer

Ignoring unnecessary object properties brought along with a Back-End object

Have a question on ignoring unnecessary object properties brought along with a Back-End model. Can you plz provide your inputs ? Let us say that an API is returning below object export class TodoObject{ public name: string; public id:…
Sam
  • 3
  • 1
-1
votes
1 answer

Argument of type 'number' is not assignable to parameter of type 'number & string'

I want to use Array.prototype.includes method in my ts file like. const id = this.selectedItem.id; ids.includes(id); Where ids is an array of numbers. I always get a compilation error: Argument of type 'number' is not assignable to parameter of…
krzyhub
  • 6,285
  • 11
  • 42
  • 68
1 2 3
11
12