title: How to check if each form control changed their value in reactive forms?
body: <p>What I want to achieve in the end is to see which form controls individually from my form have changed and to create a new object with them assigning a boolean of true if they were changed or false if not. Please see below what I achieved so far, but I don't think this the right approach as when I'll have more from controls my method will become gigantic. If you guys have any idea how I can approach this I would really appreciate it.</p>
  <p>my Html</p>
  <pre><code>&lt;form [formGroup]=&quot;editProfileForm&quot;&gt;
        &lt;ion-row&gt;
          &lt;ion-col&gt;
            &lt;ion-input
              *ngIf=&quot;profileData&quot;
              formControlName=&quot;firstName&quot;
              placeholder=&quot;First Name&quot;
            &gt;&lt;/ion-input&gt;
          &lt;/ion-col&gt;
        &lt;/ion-row&gt;
  
        &lt;ion-row&gt;
          &lt;ion-col&gt;
            &lt;ion-input
              *ngIf=&quot;profileData&quot;
              formControlName=&quot;lastName&quot;
              placeholder=&quot;Last Name&quot;
            &gt;&lt;/ion-input&gt;
          &lt;/ion-col&gt;
        &lt;/ion-row&gt;
  &lt;/form&gt;
  
  &lt;ion-fab
      vertical=&quot;bottom&quot;
      horizontal=&quot;center&quot;
      slot=&quot;fixed&quot;
      (click)=&quot;onSubmitEditedProfile()&quot;&gt;
      &lt;ion-fab-button&gt;
        &lt;ion-icon name=&quot;checkmark-outline&quot;&gt;&lt;/ion-icon&gt;
      &lt;/ion-fab-button&gt;
  &lt;/ion-fab&gt;
  </code></pre>
  <p>my TS</p>
  <pre><code>  onSubmitEditedProfile() {
      if (this.profileData !== null) {
        let updatedFirstName = this.editProfileForm.get(&quot;firstName&quot;).value;
        if (this.profileData.firstname !== updatedFirstName) {
        }
        console.log(&quot;it's the same&quot;);
      } else {
        console.log(&quot;it's different&quot;)
    }
  </code></pre>
  <p>And as my approach means, I'll do the same for <code>lastName</code> and so on</p>