title: AngularJS form Cannot read property '$setPristine' of undefined
body: <p>I know there is other similar questions to this, but i've read them all and none of them is working for me.</p>
  
  <p>When i try to set my form to a pristine, I keep getting this error:<br />
  <code>TypeError: Cannot read property '$setPristine' of undefined</code></p>
  
  <p>The controller and my angular version (1.4.2) are everything ok, because i also have other thing happening within the same function calling the <code>$setPristine();</code> method and that one is working.</p>
  
  <p>This is the code i'm using:</p>
  
  <p><strong><em>html</em></strong></p>
  
  <pre><code>&lt;form name="cadTel" novalidate&gt;
      &lt;div class="form_group"&gt;
          &lt;label class="col-md-4 f--label"&gt;&lt;i class="fa fa-asterisk"&gt;&lt;/i&gt;Nome&lt;/label&gt;
          &lt;div class="col-md-8 f--input"&gt;
              &lt;input type="text" name="ds_contato" ng-model="tel.ds_contato" ng-required="true" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form_group"&gt;
          &lt;label class="col-md-4 f--label"&gt;&lt;i class="fa fa-asterisk"&gt;&lt;/i&gt;Telefone&lt;/label&gt;
          &lt;div class="col-md-8 f--input"&gt;
              &lt;input type="text" name="num_tel" mask="(99) 9?9999-9999" ng-model="tel.num_tel" ng-required="true" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;input type="button" class="bt-m bt-suc" name="cadastrar" value="Salvar" ng-click="add_telefone(tel)"&gt;
      &lt;div class="bt-m bt-war" ng-click="reset()"&gt;Limpar&lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong><em>app.js</em></strong></p>
  
  <pre><code>$scope.tel = {};
  
  $scope.add_telefone = function(tel) {
      $scope.tel = angular.copy(tel);
      $http({
          method: 'POST',
          url:'dist/php/db.php?action=add_telefone', 
          data:$scope.tel,
      })
      .success(function (data, status, headers, config) {
          $scope.reset();
      })
      .error(function (data, status, headers, config) {
      });
  };
  $scope.reset = function() {
      $scope.tel = {};
      $scope.cadTel.$setPristine();
  };
  </code></pre>
  
  <p>The option to clean the values are working but to set pristine none.<br />
  Any ideas?</p>