title: Why does Angular JS form.$pristine not change with direct JS manipulation
body: <p>I would like to adjust display of form items such as a button's enabled/disabled attribute by testing the Angular JS pristine setting. </p>
  
  <p>When a click event fires the form's pristine value is changed as I would expect but when I manipulate the scope variable directly the form's pristine setting is not changed even though a control on the form is bound to that variable.</p>
  
  <p>Please see the following JSfiddle:</p>
  
  <p><a href="http://jsfiddle.net/nicholasporter/2h7wT/3/" rel="noreferrer">http://jsfiddle.net/nicholasporter/2h7wT/3/</a></p>
  
  <p>I would expect that the altering of the boolean value would cause the forms pristine setting to change when a control is bound to a scope variable. Is there a better way to test this? Is there a better way to adjust buttons or other DOM elements when nothing has changed on the form? Thanks in advance for any pointers. Here is the code in case the JSfiddle isn't working.</p>
  
  <pre><code> &lt;div ng-app ng-controller="MyCtrl"&gt;
      &lt;form novalidate name="myForm"&gt;
      {{myBool}}
  
        &lt;input type="checkbox" ng-model="myBool" /&gt;
        &lt;button ng-click="myBool=!myBool"&gt;JS set&lt;/button&gt;
          &lt;div&gt;Form Pristine:{{myForm.$pristine}}&lt;/div&gt;
      &lt;/form&gt;
    &lt;/div&gt;
  
  
  &lt;script&gt;
      function MyCtrl($scope){
          $scope.myBool = false;
      }
  &lt;/script&gt;
  </code></pre>