title: Angular.js programmatically setting a form field to dirty
body: <p>I am programmatically updating some of the fields on my form with a value and I would like to set the field state to <code>$dirty</code>. Doing something like:</p>
  
  <p><code>$scope.myForm.username.$dirty = true;</code> doesn't seem to work.</p>
  
  <p>There is a method <code>$setPristine</code> that I can use to reset the state of the field but there isn't a <code>$setDirty</code> method?</p>
  
  <p>So how does one go about doing this?</p>
  
  <p>I saw this post <a href="https://groups.google.com/forum/#!topic/angular/NQKGAFlsln4">https://groups.google.com/forum/#!topic/angular/NQKGAFlsln4</a> but I can't seem to find the <code>$setDirty</code> method. I am using Angular version 1.1.5.</p>