Can’t bind to ‘formGroup’ since it isn’t a known property of ‘form’

To fix this error, you just need to import ReactiveFormsModule from @angular/forms in your module.

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
port { FormsModule, ReactiveFormsModule } from '@angular/forms';

  declarations: [
  imports: [
  providers: [],
  bootstrap: [AppComponent]
export class AppModule { }

You can even import both the ReactiveFormsModule and FormsModule into your app if you need to support both Template Forms and Reactive Forms in the same Angular application or feature.

Once you’ve updated your module file to include the ReactiveFormsModule, your app and new form should work.

Leave a Reply

Your email address will not be published. Required fields are marked *