angular – Cant bind to ngModel since it isnt a known property of input error
angular – Cant bind to ngModel since it isnt a known property of input error
- You dont want to import modules in your component.
So remove this from the component:
import {FormsModule} from @angular/forms;
- Make sure CustomerModule is imported in your AppModule.
Let me know if that helps.
Perhaps a tad late, but hopefully will help others.
First, you should import FormsModule on app.module.ts –import { FormsModule } from @angular/forms
Second, use FormsModule like so:
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule
],
providers: [],
bootstrap: [AppComponent]
})