Reputation: 342
I am using Angular 6 and I would like to save the content of a form into a json file. Is there a way this can be done?
<div class="container">
<div class="row">
<div class="col-md-12">
<form input type="text" id="firstName"
...
input type = "text id="lastName" />
</div>
</div>
</div>
output.json
{
"firstName": "John",
...
"lastName": "Doe"
}
Upvotes: 0
Views: 1312
Reputation: 9754
In Client side, its not possible to save content. But this can be achievable using the API in the backend server. Client Side App can send the content to the backend server using API. Server can receive the content and save it to the file.
Upvotes: 2