Christopher Wynn
Christopher Wynn

Reputation: 15

How do I write to a json File in angular?

I am trying to write some data from 4 drop down lists (making a fake service) that when I press submit it writes the 4 away to a JSON file.

A little more context:

I am making a pizza application (like dominos) to learn angular. I have been tasked with after you press order pizza it sends the pizza to a manage order screen. When I press submit I want my pizza to be sent to my fake service which just saves it to a JSON and then the manage order screen should then read the json to populate that screen.

Upvotes: 0

Views: 77

Answers (1)

Anurag Srivastava
Anurag Srivastava

Reputation: 14413

You cannot write to a file using Javascript on the client side. Consider a server side library.

Upvotes: 2

Related Questions