You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a question about @ngrx/data which I'm not sure would be considered a bug or working as intended. The issue relates to adding a new entity to the backend.
You can create an entity collection service a couple different ways:
Inject EntityServices and use it to grab one of the default entity collection services from its registry like so...
I've noticed the add method of default vs custom entity collection services behaves differently. The custom service will let you supply a partial type. However, with the add method of the default service TypeScript will complain if you try supplying a partial. I would of course like to avoid creating a custom service for every single entity type.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've got a question about @ngrx/data which I'm not sure would be considered a bug or working as intended. The issue relates to adding a new entity to the backend.
You can create an entity collection service a couple different ways:
I've noticed the add method of default vs custom entity collection services behaves differently. The custom service will let you supply a partial type. However, with the add method of the default service TypeScript will complain if you try supplying a partial. I would of course like to avoid creating a custom service for every single entity type.
Here is a stackblitz project demonstrating this. Could someone let me know?
https://stackblitz.com/edit/angular-ivy-xbuvcn?file=src%2Fapp%2Fapp.component.ts
Beta Was this translation helpful? Give feedback.
All reactions