NG8002: Can't bind to 'formGroup' since it isn't a known property of 'form'|

Опубликовано: 19 Июль 2023
на канале: Cheers With Code
779
11

#NG8002
#angular
In the steps, it is mentioned that we must import #FormsModule, and #ReactiveFormsModule from '@angular/forms' in each and every module that uses FormGroup.


You might have added it to the app.module.ts file. But that might not work.


We need to follow Auth modules strategy to handle errors related to this type of most commonly used modules as explained in the Video and below article.


Angular Material Tutorial


Add a shared module in your angular app. Refer to it in the App.module.ts file.


Further import FormsModule, and ReactiveFormsModule in that module to avoid importing them in every child component.


#formGroup Spell Check
You will think of me as a dumb person, but it's happened to me.


I have imported everything still got Can't bind to 'form group' since it isn't a known property of the 'form' error.


Why because in the component HTML file, while using form group I have added


form [FormGroup]="regFrom" (submit)="sign-Up()"
FormGroup: Capital F instead of small f


form [formGroup]="regFrom" (submit)="sign-Up()"
And other cases might be adding forms group extras, instead of form group


This kind of error happens frequently, and these spell checks are very difficult to identify. So be careful.




#angularforbeginners #angulartraining #angular_developer
#developer #developers #angulartutorial #softwareengineer #softwaredeveloper


Смотрите видео NG8002: Can't bind to 'formGroup' since it isn't a known property of 'form'| онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Cheers With Code 19 Июль 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 779 раз и оно понравилось 11 людям.