How ngModel Can’t bind not a known property of input in Angular

For using ngModel ,You should include FormsModule first in your application.

because by default angular does not recognise the “ngModel“.

 

Steps for adding  FormsModule in your code are .

Open your app.module.ts file.

import the line : – import { FormsModule } from ‘@angular/forms’;

and also add the FormsModule in imports array like this :-

imports: [
BrowserModule,
FormsModule
]

Check it also

check for the documentation

Leave a Reply

Your email address will not be published. Required fields are marked *