There is no directive with “exportAs” set to “ngForm”

import { FormsModule }   from '@angular/forms';
import { ReactiveFormsModule }   from '@angular/forms';

@NgModule({
  imports: [
             BrowserModule,
             ReactiveFormsModule,       //<----------make sure you have added this.
             FormsModule      //<----------make sure you have added this.
           ],
  ....
})

Add Comment