title: Unable to reset an Angular Material design Form from controller
body: <p>I have an Angular Material design form with 3 input fields which have <code>required</code> option. I am not able to reset form to it's default state after clicking submit button. I am using <code>$setPristine</code> to change form to pristine state but the red error lines are appearing after submit. Is there any way to get rid of these errors after submitting form. </p>
  
  <p>Thank you. </p>
  
  <blockquote>
    <p>Codepen Link: <a href="http://codepen.io/sateesh2499/pen/pbkjVV" rel="nofollow">http://codepen.io/sateesh2499/pen/pbkjVV</a></p>
  </blockquote>
  
  <p><strong>View:</strong></p>
  
  <pre><code>&lt;div ng-controller="AppCtrl" layout="column" ng-cloak="" class="inputdemoErrors" ng-app="MyApp"&gt;
  
    &lt;form name="careersForm"&gt;
          &lt;div class="careersContainer"&gt;
              &lt;md-content&gt;
                  &lt;div layout-gt-sm="row"&gt;
                      &lt;md-input-container class="md-block" flex-gt-sm&gt;
                          &lt;label&gt;Job Title&lt;/label&gt;
                          &lt;input type="text" name="jobTitle" ng-model="careers.jobTitle" required&gt;
                      &lt;/md-input-container&gt;
                      &lt;md-input-container class="md-block" flex-gt-sm&gt;
                          &lt;label&gt;Job Location&lt;/label&gt;
                          &lt;input type="text" name="jobLocation" ng-model="careers.jobLocation" required&gt;
                      &lt;/md-input-container&gt;
                      &lt;md-input-container class="md-block" flex-gt-sm&gt;
                          &lt;label&gt;Job Category&lt;/label&gt;
                          &lt;input type="text" name="jobCategory" ng-model="careers.jobCategory" required&gt;
                      &lt;/md-input-container&gt;
                  &lt;/div&gt;
  
              &lt;/md-content&gt;
          &lt;/div&gt;
          &lt;div class="row text-center"&gt;
              &lt;div class="col-sm-12"&gt;
                  &lt;md-button class="md-raised" style="width: 200px"
                             ng-click="postJob()"&gt;Submit&lt;/md-button&gt;
  
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  Pristine: {{careersForm.$pristine}}
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>angular.module('MyApp',['ngMaterial', 'ngMessages', 'material.svgAssetsCache'])
  
  .controller('AppCtrl', function($scope) {
    $scope.careers = {};
    $scope.postJob = function(){
      // after successful posting
      $scope.careers = {};
      $scope.careersForm.$setPristine();
    }
  });
  </code></pre>