David Sagang
David Sagang

Reputation: 342

Angular save the content of a form to a json file

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

Answers (1)

Suresh Kumar Ariya
Suresh Kumar Ariya

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

Related Questions