Is there a way to edit a JSON file within the asset folder of an angular project?

Viewed 876

I have a language folder inside the angular asset folder where I store multiple JSON file for each language that I read during run time. I would like to make provision so the user may see the contents of the JSON file and edit it. This must be updated in the server so it reflects to all the other users.

I use JAVA for all the backend services.

Is there a way to achieve it and could you point me towards it?

enter image description here

1 Answers

You can not edit served frontend files via your frontend.

To realise this you should save the json file in your backend and request them in your frontend. If you don not want to request the file each time you can cache it or save it in your localStorage of your browser.

If you have the file in the backend you will need an api-access point to manipulate and request the file.

Related