Template parse errors: There is no directive with "exportAs" set to "ngForm" angular testing error code example
Example: no directive found with exportas 'ngform'
import { FormsModule } from '@angular/forms';
@NgModule({
imports: [
BrowserModule,
FormsModule //<----------make sure you have added this.
],
....
})