ERROR in Can't bind to 'formGroup' since it isn't a known property of 'form'. ("branchNameError" style="color: red;">Branch Name is required</div> </div> --> <form [ERROR ->][formGroup]="form" class="ui-g"> code example
Example 1: Can't bind to 'formGroup' since it isn't a known property of 'form
mport { BrowserModule } from '@angular/platform-browser';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
@NgModule({
imports: [
BrowserModule,
FormsModule,
ReactiveFormsModule
],
...
Example 2: 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 { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
@NgModule({
imports: [
BrowserModule,
FormsModule,
ReactiveFormsModule
],
declarations: [
AppComponent
],
bootstrap: [AppComponent]
})
export class AppModule { }