Can't bind to 'ngif' since it isn't a known property of 'p'. code example
Example 1: Can't bind to 'ngModel' since it isn't a known property of 'input'.
import { FormsModule } from '@angular/forms';
[...]
@NgModule({
imports: [
[...]
FormsModule
],
[...]
})
Example 2: core.js:7813 Can't bind to 'ngIf' since it isn't a known property of 'div'
import { CommonModule } from '@angular/common';
import { BrowserModule } from '@angular/platform-browser';
Example 3: Can't bind to 'ngModel' since it isn't a known property of 'input'.ng
if we want to implement form in agular we need to add 'FormsModule' in app-module.ts imports: section
Example 4: core.js:7813 Can't bind to 'ngIf' since it isn't a known property of 'div'
@NgModule({
imports: [CommonModule],
declarations: [MyComponent]
...
})
class MyComponentModule {}