NG0303: Can't bind to 'ngIf' since it isn't a known property of 'form'. 1

NG0303: Can’t bind to ‘ngIf’ since it isn’t a known property of ‘form’.

// If you are using RC5 then import this:

import { CommonModule } from '@angular/common';  
import { BrowserModule } from '@angular/platform-browser';

// and be sure to import CommonModule from the module that is providing your component.

 @NgModule({
    imports: [CommonModule],
    declarations: [MyComponent]
  ...
})
class MyComponentModule {}

Here is what the above code is Doing:
1. The CommonModule is imported from the @angular/common package.
2. The CommonModule is imported into the module that is providing the component.
3. The CommonModule is added to the imports array of the module that is providing the component.

Similar Posts