Basic angular interview question Which module do we need to include for using forms in app and where?

Anil Kumar
Jun 19, 2023

--

Photo by sarah Mahmuda on Unsplash

We need forms Module- two types

  1. Reactive — ReactiveFormsModule
  2. Template driven — FormsModule
import { ReactiveFormsModule } from '@angular/forms';
or
import { FormsModule } from '@angular/forms';
NgModule({
declarations: [
......

],
imports: [
....

ReactiveFormsModule,
...... or
FormsModule
........

],
providers: [],
bootstrap: [AppComponent],
exports:[]
})
export class AppModule { }

--

--