title: AngularJS | Conditional Class using ng-class
body: <p>I'm wanting to apply a conditional class to an element on the page. </p>
  
  <p>Currently it's working with the following code: </p>
  
  <pre><code>ng-class="{ 'vfnz-form--error' : loginForm.username.$invalid  }
  </code></pre>
  
  <p>This applies a invalid class if the input field is invalid. I'm wanting to apply a "<strong>valid"</strong> class when the user input field is valid. </p>
  
  <p>Is this possible to achieve in the same line of code? </p>
  
  <p>Here is a fiddle example: <a href="http://jsfiddle.net/beuL679o/14/" rel="nofollow">JSFIDDLE</a></p>