Uncaught (in promise): Error: Cannot find control with unspecified name attribute Error: Cannot find control with unspecified name attribute code example

Example 1: ERROR Error: No value accessor for form control with unspecified name attribute

Add ngDefaultControl attribute to the element that carries the [(ngModel)] attribute.

Example 2: 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
*/