Update a single property of local JSON file using put call in Angular 8

前端 未结 3 696
野性不改
野性不改 2021-01-27 16:11

I want to update my JSON file which I have placed in my assets folder, so If I am updating just one property of my JSON object so it should update that property only, without af

3条回答
  •  闹比i
    闹比i (楼主)
    2021-01-27 16:50

    No! You cannot change a file’s content using Angular. It is a file I/O operation that is handled by a backend framework/language (for example Node.JS) having file system API. You can create a RESTful API to modify the contents of the file and make an HTTP call from Angular.

提交回复
热议问题