I am trying to use ngrx-data-lab as an example for my project.
Here's is the stackblitz of project I used.
I can't use the actual url of the server that I am using. The url belongs to my company. But what is happening is that the server is returning the randomly generated data to the application. The problem is that the entities in store don't get replaced but instead they are added up. Every time I refresh the heroes page the server brings new data and concatenates it with the old data.
In entity-store.module.ts I changed defaultDataServiceConfig root and Hero urls to my server. getAll() works, but as I said again it concats the data to old one.
root: 'api', // default root path to the server's web api
// Optionally specify resource URLS for HTTP calls
entityHttpResourceUrls: {
// Case matters. Match the case of the entity name.
Hero: {
// You must specify the root as part of the resource URL.
entityResourceUrl: 'api/hero/',
collectionResourceUrl: 'api/heroes/'
}
},
How do I make the getAll replace the old data istead of concat-ing it?