Questions tagged ngrx-entity

Explore the latest questions and answers asked by our top developers.

select singleton entity from ngrx entity without id

I’m trying to implement authentication using ngrx with entity. My solution up to this point was to divide the users in the store so there is ‘users’ and ‘user’, the latter is used to track the authenticated user. Id like to be able to display the logged in user data in the UI, which requires […]

By breadman0
Published
Categorized as angular, authentication, ngrx, ngrx-entity, rxjs Tagged , , , ,

How to implement pagination with angular and ngrx/entity?

I am using NgRx/Entity state adapter to load list of posts for my angular based project. The data that I receive from backend contains success message, an array with a list of posts and the total number of posts. It looks like this in @effect file after getting response from server: { message: "Posts list […]

NGRX createSelector object get middle line, when create special selector with filter (Update to NGRX 2021)

Hello guys I am create a selector that filter some thinks from the store but when I implement that on selectors it create a line on the object. The selector work properly but I see middle line on it like something isn’t 100% well. How can I fix it? Thanks for your help! product.selector.ts export […]

Ngrx data additionalCollectionState not working

i am trying to create a lazy-loaded post-module with Ngrx data. The goal is to add an additional Collection State but its but is not working. the Post Persistence Result Handler not firing. Source: Angular Questions

ngrx add object to same id

I’m using ngrx store with socket and i want to stock all the data that i receive from back-end in the store. i’m right now using ngrx entity adapter the "upsertMany" so when a new object arrive i register it in the store but the previous value will be deleted. export const defaultPosition: PositionState = […]

Angular/Ionic – Ngrx – Update object in array

I’m working with Ionic + Angular + Ngrx and Firebase/Angularfire. I’m fairly new to all of this (except Firebase) and got a background in React development. I created quite a simple note-taking app that stores the data in Firebase and fetches old notes from FB as well. I had it all working but decided to […]

Using @ngrx/data, how can you form JSON patch documents from updates to entities on a custom data service?

My use case of @ngrx/data requires that I build custom entity data services by extending DefaultDataService<T>. The API I am working with accepts JSON patch documents for updates. EntityCollectionDataService<T> defines the following function for updates: update(update: Update<T>): Observable<T>; Where Update<T> has the member changes which is of type Partial<T>. The issue I am facing here […]

How to check if an entity exists in store before dispatching action?

I have an avatar component used for displaying avatar of users and that component is used on multiple other components. Each avatar component tries to get the user from the server. But I am seeing a lot of actions dispatched from multiple components. Here is what I want to do: check if an entity exists […]

By Nebex Elias
Published
Categorized as angular, ngrx, ngrx-entity, ngrx-store, rxjs Tagged , , , ,

@ngrx/data How to cancel request providing with getAll, getWithQuery, getByKey

I use ngrx/data in my app. I have a very quick application. You can select something on UI and I need to update my view. A user can do it very quickly, I do not need any previous data from previous requests in that case. But when I add switchMap – my request doesn’t cancel. […]

Cannot read property ‘map’ of undefined using angular with ngrx

I need help to understand this error that happens when I try to use an Observable array that comes from store. this is the console error ERROR TypeError: Cannot read property ‘map’ of undefined at ngrx-entity.js:67 at ngrx-store.js:1198 at memoized (ngrx-store.js:1039) at defaultStateFn (ngrx-store.js:1079) at ngrx-store.js:1207 at memoized (ngrx-store.js:1039) at ngrx-store.js:1198 at memoized (ngrx-store.js:1039) at […]

1 2 3

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq