Angular Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input’

Issue –

This issue occurs when you have not imported ‘FormsModule’ inside your highest level module.ts

Solution –

Let’s assume that the highest level module.ts file is app.module.ts

Modify your app.module.ts file as follows

import { FormsModule } from '@angular/forms';

  imports: [
  • Add import statement for FormsModule
  • add FormsModule to the imports array

Please note that if your app has several modules, you may need to do this configuration on the highest level module.ts file

Leave a Reply

(*) Required, Your email will not be published