I am currently extracting information from a JSON file stored in my assets folder and displaying it in a table format. At the moment, the JSON file is only loaded during the Angular application build process. I want to make it possible to dynamically load or delete this file even after the application has been built.
The specific file I want to fetch dynamically is located in 'src/assets/data/'
This is how I am retrieving the JSON file:
export let MyData: MYDATA[] = require('src/assets/data/MyJSON.JSON');
In the end, my goal is to be able to update or remove the JSON file in the assets folder, which would automatically reflect changes in the MyData variable and update the table. This way, I wouldn't have to run ng build every time the JSON file is modified.