Uncaught Error: Template parse errors: Can't bind to 'NgModel' since it isn't a known property of 'input' code example
Example 1: Uncaught Error: Template parse errors: Can't bind to 'ngModel'
Try to import FormModule an app.module.ts file
import { FormsModule } from '@angular/forms'
@NgModule({
declarations: [
....
],
imports: [
...,
FormsModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Example 2: 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