Answers for "Can't bind to 'formGroup' since it isn't a known property of 'form'"

13

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
    ],
    ...
Posted by: Guest on July-17-2020
3

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 { }
Posted by: Guest on June-10-2020
2

can't bind to 'formgroup' since it isn't a known property of 'form'

Just regiester the new component that you created in the app.module.ts.
This issue happens when you forget to register your newly created component.
Posted by: Guest on August-17-2021
0

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

Add to app.module.ts:

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 { }
Posted by: Guest on July-29-2021

Code answers related to "Can't bind to 'formGroup' since it isn't a known property of 'form'"

Code answers related to "Javascript"

Browse Popular Code Answers by Language