Angular2 compiler-cli not recognizing [ngClass] or *ngIf
<p>I want to compile ahead-of-time using the latest version Angular's offline compiler. I updated all the necessary packages to RC5, have the latest version of the compiler, etc. </p>

<p>But then I got a bunch of errors such as: </p>

<ul>
<li>Can't bind to 'ng-class' since it isn't a known property of 'div'.</li>
<li>Can't bind to 'ngIf' since it isn't a known property of 'div'.</li>
<li>Property binding ngIf not used by any directive on an embedded template. Make sure that the property name is spelled correctly and
all directives are listed in the "directives" section.</li>
<li>Can't bind to 'ngClass' since it isn't a known property of 'my-component'.</li>
</ul>

<p>I noticed from <a href="http://www.syntaxsuccess.com/viewarticle/offline-compilation-in-angular-2.0" rel="nofollow">http://www.syntaxsuccess.com/viewarticle/offline-compilation-in-angular-2.0</a> that it may be necessary to include common directives in the @Component decorator. But it looks like this has been fixed since RC5: <a href="https://github.com/angular/angular/blob/master/CHANGELOG.md" rel="nofollow">https://github.com/angular/angular/blob/master/CHANGELOG.md</a>. And the error I'm getting when I try this seems to suggest this is no longer necessary:</p>

<blockquote>
  <p>Type NgIf is part of the declarations of 2 modules: CommonModule and AppModule!</p>
</blockquote>

<p>I can also compile and run the site normally using tsc and RC5, so it isn't an upgrading issue. So I'm totally at a loss as to what may be causing these errors. </p>

<p>Any help is much appreciated.</p>