I just started to use NgRx Data on my project and I'm searching for a couple of hours and I can't find a solution for a problem that I'm facing with.
I'm trying to change the default root of calls by using DefaultDataServiceConfig like that:
app.module.ts
export const defaultDataServiceConfig: DefaultDataServiceConfig = {
root: `${environment.apiUrl}/`,
};
@NgModel({
...
providers: [
{
provide: DefaultDataServiceConfig
useValue: defaultDataServiceConfig
}
]
});
environment.ts
export const environment = {
...
apiUrl: 'https://my-api.com/v1',
};
However, the call is going to localhost http://localhost:3000/client/list
instead of going to my-api.com https://my-api.com/v1/client/list
.
Is there something that I'm missing? I can't find any examples and ngrx.io documentation is a poor one.