no directive found as ngForm in angular code example
Example: no directive found with exportas 'ngform'
import { FormsModule } from '@angular/forms';
@NgModule({
imports: [
BrowserModule,
FormsModule //<----------make sure you have added this.
],
....
})