PatrickJS-starter: Can't bind to 'formGroup' since it isn't a known property of 'form'

first of all i have all needed imports import { FormsModule,ReactiveFormsModule } from '@angular/forms'; and

@NgModule({
 bootstrap: [AppComponent],
 ....
 imports: [ 
     ...
     ReactiveFormsModule,
     FormsModule,

and stack

<form [ERROR ->][formGroup]="myGroup">

</form>

in another angular 2 repo this works fine

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 21 (1 by maintainers)

Most upvoted comments

I got the same problem. As I was using <form [FormGroup]=“myForm”>. Then I changed it to <form [formGroup=‘myForm’]> It solved the issue.

import FormsModule, ReactiveFormsModule, in modules where that component exists …

add “ReactiveFormsModule” in your component as well.

import { FormGroup, FormArray, FormBuilder, Validators,ReactiveFormsModule } from ‘@angular/forms’;

Hy in your AppModule, do this.

import { FormsModule, ReactiveFormsModule } from ‘@angular/forms’;

and add ReactiveFormsModule to imports Array

imports: [ FormsModule, ReactiveFormsModule ]