title: Prevent Angular 2 from applying changes when input field gets edited
body: <p>I bound a variable to an input filed using interpolation (value of variable gets reflected in the input field). The variable gets updated automatically in the background whenever the according value in the database changes. </p>
  
  <p>I would like to prevent Angular from applying the changes of the variable to the input field IF the user is currently editing this field. Otherwise, the editing of the user will be overwritten.</p>
  
  <p>(In other words: I would like that Angular checks if the input field is currently flagged with ng-pristine and not ng-dirty before it updates the value.)</p>
  
  <p>What is the easiest why to achieve that? </p>
  
  <p><strong>Idea:</strong>
  Shouldn't it be possible to implement a directive that is equal to ngModel but checks if the class ng-dirty is set before applying the value?</p>
  
  <p><strong>Optimal Solution:</strong>
  Having a directive, that does two-way-data-binding like ngModel. The directive applies changes within the model to the view if the "ng-dirty" flag is not set for the view. The directive applies changes within the view to the model if the view loses its focus (if the blur event gets triggered).</p>