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
0
votes
0 answers
tag"NgRX-Forms" addArrayControl (HOW CAN I ADD A STRING TO MY TABLE THAT IS INSIDE AN OBJECT TABLE WITH AN INDEX)
I need your help on NgRx forms, I need to add to the pregk table a value on an alias [index], without it touching me other alias [other_index]
my entities
export interface CreationPersonnePhysiqueLieeForm {
type: TypePersonne;
nomMarital?:…
0
votes
1 answer
ngrx data - collection service and data service, custom endpoint observable
I needed a custom PUT request related to my entity in ngrx/data, I would like to show it as I am not certain it is accurate... Say a I have a movie library and I can add tags to movies with PUT request.
My data service:
export class MovieDataService…

grx00
- 19
- 3
0
votes
0 answers
ngrx/Data API call with path params
I am trying to implement ngrx Data. However the API does not take query params, instead it takes path/route params. How can I achieve the following calls with ngrx/Data:
GET /api/v1/Entity/{CategoryIdentifier} Returns all the…

artur shevtsov
- 77
- 1
- 9
0
votes
1 answer
Ngrx/data overwrite entityResource method from DefaultHttpUrlGenerator
My goal is to send to the backend a request like this "localhost:8889/api/notebooks/1". By default it sends this request "localhost:8889/api/notebook/1".
What I tried until now is to provide a custom HttpGenerator in app.module.ts.
{
…

Jean-Paul Abi-Ghosn
- 179
- 1
- 8
0
votes
1 answer
NgRx does an weird redirect to HTTP before go to HTTPS that's cause an CORS ERROR
I'm new with ngrx and I want to use NgRx Data module. I'm in a stack with Angular/Symfony hosted in docker with Traefik (https mode).
I want to do a request to a route named : https://xxx.xxxxxx.localhost/operations
This route normally send me my…

Joachim DARMALINGON
- 23
- 3
0
votes
1 answer
EntityAction guard error while using add in ngrx data
dears,
I get this error when trying to add()
ngrx-data.mjs:4531 Error: test EntityAction guard for "[test] @ngrx/data/save/add-one/success": payload should have a single entity.
here's the "test" interface / entity config
export interface test {num:…

A B
- 11
- 1
0
votes
1 answer
Is it a bad idea to save Date into NgRx store?
I'm creating a full-stack sample with Micro-ORM, NestJS, Angular, and NgRx Data.
I want to cover as many as possible functions with NgRx Data.
I have entities that contain Date properties but I had an error when I wanted to create a new entity on…

Ferenc T
- 766
- 1
- 6
- 12
0
votes
2 answers
Subscribe geting called twice for a single ngrx-data service call
I'm very new to ngrx-data and I'm try to detect why loading a few records is taking so long
Here is how I subscribe to the ngrx-data entities:
this.subscriptions.push(this.mileageTrackingManagmentService.entities$.subscribe(data => {
…

Mauricio Gracia Gutierrez
- 10,288
- 6
- 68
- 99
0
votes
1 answer
How to force ngrx-data to clear cached entities and reload data from db
I have a typical ngrx-data arrangement of 'User' entities linked to db.
I implement the standard service to handle the data:
@Injectable({providedIn: 'root'})
export class UserService extends EntityCollectionServiceBase {
…

Felix
- 1,662
- 2
- 18
- 37
0
votes
1 answer
How to update state with an array via NGRX reducer in Angular?
I want to update my state using a ngrx reducer but I'm getting an compilation error.
For context. The user submits a worklog on a form, and I want this worklog to be added to the worklogs array on the state.
Here is the structure of my state:
export…

Luis Arellano
- 41
- 3
0
votes
0 answers
update function from service gets called twice every time
I have an angular application and inside of it I've setup ngrx data but I've noticed every time I call the entity service
i.e
this.purchaseOrderEntityService.update(updatedPurchaseOrder);
it seems to run twice and hit the http endpoint twice to…

Corey James Carney
- 167
- 1
- 2
- 14
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
0
votes
1 answer
Default params in ngrx getWithQuery()
I wonder how can send the default data already in getWithQuery(), like this:
@Injectable({providedIn: 'root'})
export class CompaniesDataService extends DefaultDataService {
private readonly _URL: string = '/api/companies';
private…

Ania
- 292
- 4
- 11
0
votes
1 answer
Ngrx + Jasmin Testing Issue (actual.subscribe is not a function)
While implementing the Spec file for the auth guard we write in the angular app is giving me an error I am not able to contemplate to what's happening.
Auth Guard -------------> should return FALSE if the user state is not logged in FAILED
…

Aayushi Gupta
- 369
- 4
- 18
0
votes
1 answer
Unit testing Ngrx select angular
I have something like this
ngOnInit(): void {
this.store.select('loggedUser').pipe(take(1))
.subscribe(user => {
this.loggedUser = user;
});
}
it('should init well', () => {
// GIVEN
const store =…

Miomir Dancevic
- 6,726
- 15
- 74
- 142