Angular2 Error: There is no directive with “exportAs” set to “ngForm”

Since 2.0.0.rc6: forms: deprecated provideForms() and disableDeprecatedForms() functions have been removed. Please import the FormsModule or the ReactiveFormsModule from @angular/forms instead. In short: If you use template-driven forms, add FormsModule to your @NgModule. If you use model-driven forms, add ReactiveFormsModule to your @NgModule. So, add to your app.module.ts or equivalent: Failing to have one of … Read more

Can’t bind to ‘formGroup’ since it isn’t a known property of ‘form’

RC6/RC7/Final release FIX To fix this error, you just need to import ReactiveFormsModule from @angular/forms in your module. Here’s the example of a basic module with ReactiveFormsModule import: To explain further, formGroup is a selector for directive named FormGroupDirective that is a part of ReactiveFormsModule, hence the need to import it. It is used to … Read more