title: Angular toggle class on input if validation is valid
body: <p>I am trying to toggle css class on input if validation is valid, i can do if is invalid, but i need two classes if is valid and if is not. Is it easy to make it if is not valid, but how to add if is valid, here is my code i have for now:</p>
  
  <pre><code>&lt;form name="userForm" ng-submit="submitForm()" novalidate&gt;
      &lt;input type="email" name="email" placeholder="E-mailadres" class="input-field" ng-model="user.email" required ng-class="{ 'has-error' : userForm.email.$invalid &amp;&amp; !userForm.email.$pristine }" /&gt;
      &lt;p ng-show="userForm.email.$invalid &amp;&amp; !userForm.email.$pristine" class="help-block"&gt;Enter a valid email.&lt;/p&gt;
      &lt;input type="password" name="password" ng-model="user.password" placeholder="Wachtwoord" class="input-field" required /&gt;
      &lt;p ng-show="userForm.password.$invalid &amp;&amp; !userForm.password.$pristine" class="help-block"&gt;You name is required.&lt;/p&gt;
      &lt;button type="submit" class="btn hit-btn" ng-disabled="userForm.$invalid"&gt;Log in&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>You will notice that i have class <strong>has-error</strong> but i need also class <strong>no-error</strong></p>