title: ng-touched not working - AngularJS
body: <p>Form fields not being added <code>ng-touched</code> class, instead remains <code>ng-pristine</code></p>
  
  <p>This is my form:</p>
  
  <pre><code>&lt;form novalidate class="css-form"&gt;
  
              &lt;div class="form-group clearfix"&gt;
                  &lt;label class="col-xs-12 col-sm-6 col-md-4"&gt;State Code&lt;/label&gt;
                  &lt;div class="col-xs-12 col-sm-6 col-md-8"&gt;
                      &lt;input type="text" class="form-control" ng-maxlength="2" ng-model="ObjectNew.stateCode" required&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="clearfix"&gt;&lt;/div&gt;
  
              &lt;div class="form-group clearfix"&gt;
                  &lt;label class="col-xs-12 col-sm-6 col-md-4"&gt;Zip&lt;/label&gt;
                  &lt;div class="col-xs-12 col-sm-6 col-md-8"&gt;
                      &lt;input type="text" class="form-control" ng-model="ObjectNew.zip" required&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="clearfix"&gt;&lt;/div&gt;
  
          &lt;/form&gt;
  </code></pre>
  
  <p>When I see in inspect element, it does show only <code>ng-pristine</code> class on each field, even if i went through both fields and leaves null.
  It shows <code>ng-invalid</code> too, which is fine.</p>
  
  <p>Have to add the styles actually:</p>
  
  <pre><code>.css-form input.ng-invalid.ng-touched {
      background-color: #FA787E !important;
      }
  
    .css-form input.ng-valid.ng-touched {
      background-color: #78FA89 !important;
    }
  </code></pre>