title: Angular 2 error "Unhandled Promise rejection: Template parse errors:"
body: <p>When I use the <code>ngClass</code> directive like this:</p>
  
  <pre><code>[ngClass]="{has-error: !myInput.valid}"
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>Unhandled Promise rejection: Template parse errors:
    Parser Error:
    Missing expected : at column 5 in [{has-error: !myInput.valid}] in
    ...html...</p>
  </blockquote>
  
  <p>How can I solve this error?</p>