Search code examples
angularngrx

Angular won't update HTML after changes made to JSON file


I have an interesting issue. I have the following crash course for Angular / NgRx:

https://www.telerik.com/blogs/building-an-online-store-using-ngrx-store-and-angular and this is the GitHub Repo:

https://github.com/HackAfro/reactive-fruit-store

I want to make my own changes to the project, but for some reason, when I make changes to the fruits.js file (the file, that holds the info about the products) these changes aren't updated on the page afterward.

This is the file, that I want to change:

https://github.com/HackAfro/reactive-fruit-store/blob/master/fruits.js and I believe, that it is being used here:

https://github.com/HackAfro/reactive-fruit-store/blob/master/src/app/store/actions.ts (Create and map actions)

https://github.com/HackAfro/reactive-fruit-store/blob/master/src/app/store/effects.ts (Create effects to handle data fetching)

https://github.com/HackAfro/reactive-fruit-store/blob/master/src/app/store/reducer.ts (Store reducer)

Can you please let me know what needs to be changed, so I can update the content?

Thank you.


Solution

  • After making your changes to the fruit.js file, re-run node server.