I have created a Form with few fields as 'Input type Text' and the values to text box are populated from Back end. This form is an Edit Page where the user will edit the required fields alone. I am using submit type button where the enitre form is submitted to the Angular Component. Along with that, I need to track which fields are edited in this form.
Followig is the code of the Angular Form I created.
<form [formGroup]="form" (ngSubmit)="edit()">
<div class="container-fluid">
<div class="row">
<div class="col-12 edit-branch-block">
<tr>
<td>Attribute_Name_1</td>
<td><input type="text" formControlName="Attribute_Name_1" disabled></td>
</tr>
<tr></tr>
<tr>
<td>Attribute_Name_2</td>
<td><input type="text" formControlName="Attribute_Name_2"></td>
</tr>
<tr></tr>
<tr>
<td>Attribute_Name_3</td>
<td><input type="text" formControlName="Attribute_Name_3"></td>
</tr>
<tr></tr>
<tr>
<td>Attribute_Name_4</td>
<td><input type="text" formControlName="Attribute_Name_4"></td>
</tr>
<tr></tr>
<tr>
<td>Attribute_Name_5</td>
<td><input type="text" formControlName="Attribute_Name_5"></td>
</tr>
<tr></tr>
<tr>
<td>Attribute_Name_6</td>
<td><input type="text" formControlName="Attribute_Name_6"></td>
</tr>
<tr></tr>
<tr>
<td>Attribute_Name_7</td>
<td><input type="text" formControlName="Attribute_Name_7"></td>
</tr>
<tr></tr>
<button type="submit" style="margin-left: 10px; background-color:burlywood;" class="edit-branch-button"> Edit </button>
</div>
</div>
</div>
</form>
If user has edited only two fields, I need to track which fields are edited. Can anybody help me on this?