I have an Angular client app with a form.
<form class="example-form">
<mat-form-field class="example-full-width" appearance="fill">
<mat-label>SMTP Host</mat-label>
<textarea matInput placeholder="Ex: smtp.gmail.com"></textarea>
</mat-form-field> <br>
<mat-form-field class="example-full-width" appearance="fill">
<mat-label>SMTP Port</mat-label>
<textarea matInput placeholder="Ex: 587"></textarea>
</mat-form-field> <br>
<mat-form-field class="example-full-width" appearance="fill">
<mat-label>SMTP User Name</mat-label>
<textarea matInput placeholder="Ex: [email protected]"></textarea>
</mat-form-field> <br>
<mat-form-field class="example-full-width" appearance="fill">
<mat-label>SMTP User Password</mat-label>
<textarea matInput placeholder="Ex: password"></textarea>
</mat-form-field> <br>
<mat-form-field class="example-full-width" appearance="fill">
<mat-label>SMTP From</mat-label>
<textarea matInput placeholder="Ex: [email protected]"></textarea>
</mat-form-field> <br>
<mat-form-field class="example-full-width" appearance="fill">
<mat-label>SMTP Display Name</mat-label>
<textarea matInput placeholder="Ex: Jhon"></textarea>
</mat-form-field> <br>
<mat-form-field class="example-full-width" appearance="fill">
<button mat-button>Save</button>
</mat-form-field>
</form>
What I want to do is to save the content of each form's field in a XML file which will be read by other app. How could I accomplish this task? I have seen that file-saver could be something that might be helping me, but I'm not sure how.
I'm working with:
Angular CLI: 12.2.5
Node: 14.17.6
Package Manager: npm 6.14.15
Package Version
@angular-devkit/architect 0.1202.5 (cli-only)
@angular-devkit/core 12.2.5 (cli-only)
@angular-devkit/schematics 12.2.5 (cli-only)
@schematics/angular 12.2.5 (cli-only)