title: ngClass not working?
body: <p>I am new to AngularJS and I understand that the ngClass directive can be used to insert classes dynamically into elements like:</p>
  
  <pre><code>&lt;input ng-class="{some-class: condition, another-class: anotherCondition}"&gt;
  </code></pre>
  
  <p>And angular will automatically evaluate which conditions  are true and will insert those particular classes in the element.</p>
  
  <p>Now I am trying to do something like:</p>
  
  <pre><code>&lt;div class="form-group" ng-class="{has-success: form.email.$valid}"&gt;
  </code></pre>
  
  <p>Since I have bootstrap, it will automatically color the label and the input green if the email is valid. But it doesn't work and I am getting this particular error in the console:</p>
  
  <pre><code>Error: [$parse:syntax] http://errors.angularjs.org/1.2.27/$parse/syntax?p0=-&amp;p1=is%20unexpected%2C%20expecting%20%5B%3A%5D&amp;p2=5&amp;p3=%7Bhas-success%3A%20form.email.%24valid%7D&amp;p4=-success%3A%20form.email.%24valid%7D
  z/&lt;@http://ajax.googleapis.com/ajax/libs/angularjs/1.2.27/angular.min.js:6:450
  </code></pre>
  
  <p>and so on....</p>
  
  <p>What am I doing wrong? Is it a syntax issue?</p>