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.
{
provide: HttpUrlGenerator,
useClass: class extends DefaultHttpUrlGenerator
{
override entityResource(entityName: string, root: string, trailingSlashEndpoints: boolean): string {
return super.collectionResource(entityName, root);
}
}
},
But it gives me this error
Error: Module not found: Error: Package path ./src/dataservices/http-url-generator is not exported from package *****\node_modules\@ngrx\data (see exports field in *****\node_modules\@ngrx\data\package.json)
What am I doing wrong?