title: Angular - Reactive form, how to correctly store the initial value, and check for changes in the form?
body: <p>I'm using reactive forms with angular 6 and I have 2 questions.</p>
  
  <p>First one, what's the correct way to store the initial value of a form?</p>
  
  <p>I'm pretty new to angular, and what I've done so far, is to declare in the controller all the form code, and then in the view I bind those controls with the <code>fromControlName</code> tag.</p>
  
  <p>Everything works correctly, but now I want to implement a Save/Cancel button.
  As the form comes prefilled based on some choices made by the user (I prefill the form with <code>this.myForm.get("valueToPrefill").setValue(prefillValue)</code>) so when the user opens the form, some fields will be already prefilled!</p>
  
  <p>What I need to do, is, to clone somehow or store the initial data, so when the user is done editing, if he presses "Save", then this temporary form data will be written on the form (I guess with the same way I prefill it, <code>get("form_Name).setValue(</code>) right?), but if he were to use the Cancel button, then I should revert to form to the original state!</p>
  
  <p>Currently when an user fills a form value, it gets written directly on the form, because of the <code>fromControlName</code> tag, which binds the input fields to my form.</p>
  
  <p>What should I do here to have a copy of the form to write on, and only after I save, it writes those value on the original form I declared in my controller?</p>
  
  <p>Second question, currently my Save button gets disabled if the form is pristine.
  But I would want to go one step further! 
  If a user deletes a characted, or changes a dropdown, but then reverts those changes by going back to the original value, the form is now dirty, but the data actually never changed from the initial status! So how can keep the Save button disabled in this case?
  I can imagine doing a check when I manage to have a cloned form, so I can check the initial data with the stored one, and compare them right?</p>
  
  <p>Thank you very much</p>