title: AngularJS : ng-disable not working
body: <p>I'm trying to disable enable a button based on an input type value. Here is the Angular JS html code</p>
  
  <pre><code>&lt;div ng-app&gt;
      &lt;form name="myForm" ng-controller="ctrl"&gt;
          &lt;input type="text" ng-model="name" ng-required="true" /&gt;
          &lt;span&gt;{{name}}&lt;/span&gt;
          &lt;input type="submit" value="Submit" ng-disabled="myForm.name.$pristine" /&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And the controller code:</p>
  
  <pre><code>function ctrl($scope){
      $scope.name = "hello";
  }
  </code></pre>
  
  <p>But the button is not getting disabled no matter what. </p>
  
  <p>Here is the <a href="http://jsfiddle.net/rE8p9/" rel="nofollow">DEMO</a></p>
  
  <p><strong>NOTE:</strong> I want the button to be disabled only when text box doesn't have any value and vice versa</p>