Basic angular interview question Which module do we need to include for using forms in app and where?
Jun 19, 2023
We need forms Module- two types
- Reactive — ReactiveFormsModule
- 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 { }