close

[Solved] Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input’

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error [Solved] Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input’ in javascript. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input’Error Occurs?

Today I get the following error [Solved] Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input’ in javascript.

How To Solve Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input’ Error ?

  1. How To Solve Can't bind to 'ngModel' since it isn't a known property of 'input' Error ?

    To Solve Can't bind to 'ngModel' since it isn't a known property of 'input' Error In order to be able to use two-way data binding for form inputs you need to import the FormsModule package in your Angular module.

  2. Can't bind to 'ngModel' since it isn't a known property of 'input'

    To Solve Can't bind to 'ngModel' since it isn't a known property of 'input' Error In order to be able to use two-way data binding for form inputs you need to import the FormsModule package in your Angular module.

Solution 1

Yes, that’s it. In the app.module.ts file, I just added:

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

[...]

@NgModule({
  imports: [
    [...]
    FormsModule
  ],
  [...]
})

Solution 2

In order to be able to use two-way data binding for form inputs you need to import the FormsModule package in your Angular module.

For more information, see the Angular 2 official tutorial here and the official documentation for forms.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment