Angular $setPristine is not working
<p><strong><em>Html :</em></strong></p>

<p>I'm using controller as syntax.</p>

<pre><code>    &lt;form name="occupantDetailForm" role="form" novalidate class="form-validation"&gt;
      &lt;div class="form-group form-md-line-input form-md-floating-label no-hint"&gt;
            &lt;input class="form-control" type="text" name="LastName" ng-model="vm.occupantDetail.lastName" ng-class="{'edited':vm.occupantDetail.lastName}" maxlength="@OccupantDetail.MaxLength" required&gt;
              &lt;label&gt;@L("LastName")&lt;/label&gt;
       &lt;/div&gt;

&lt;button type="submit" class="btn btn-primary blue" ng-click="vm.saveOccupantDetail(occupantDetailForm)" ng-disabled="occupantDetailForm.$invalid"&gt;&lt;i class="fa fa-save"&gt;&lt;/i&gt; &lt;span&gt;@L("Save")&lt;/span&gt;&lt;/button&gt;
    &lt;/form&gt;
</code></pre>

<p><strong><em>JS :</em></strong></p>

<pre><code> vm.saveOccupantDetail = function (form) {
                    vm.occupantDetailForm = form;
                    createOrEditOccupantDetail();//create or edit 
                    vm.occupantDetail = {};
                    vm.occupantDetailForm.$setPristine();
                      }
</code></pre>

<p><strong><em>Q :</em></strong> I have tried many ways but it is not working ? When I use the <code>vm.occupantDetailForm.$setUntouched();</code> then it works fine.But then the problem is <code>Save</code> button is not being disabled.Could you tell me why ? When I use the <code>vm.occupantDetailForm.$setPristine();</code> only then it is not working at all.Why ? Thanks.  </p>