i run command ng serve in terminal window of my project & press enter
i got following error
Error: node_modules/@angular/forms/forms.d.ts:2140:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
This likely means that the library (@angular/forms) which declares FormGroup has not been processed correctly by ngcc, or is
not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
2140 export declare class FormGroup extends AbstractControl {
to solve this issue go to app.module.ts remove
import { FormGroup } from '@angular/forms';
& remove
,FormGroup from imports: array
just add import { ReactiveFormsModule } from '@angular/forms';
in the app.module.ts & also add ReactiveFormsModule in the imports: array
for Form group
here is your solved
Ещё видео!