Answers for "error TS2304: Cannot find name 'NgForm'."

0

error TS2304: Cannot find name 'NgForm'.

/*
The answer of this context "error TS2304: Cannot find name 'NgForm'."

There are chances of arising this error in angular when we import 'NgForm' from '@angular/forms' in .component.ts file.

To resolve this error you may have added below code line in app.module.ts file
*/

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

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

/*
I hope that it will help you.
Namaste
*/
Posted by: Guest on May-05-2020

Code answers related to "error TS2304: Cannot find name 'NgForm'."

Code answers related to "TypeScript"

Browse Popular Code Answers by Language