Reputation: 1
I am trying to use the Reactive Forms of Angular js 2 and I have imported both Formcontrol and ReactiveFormsModule in my component but I am having this error. enter image description here
[Product.component.ts]
Upvotes: 0
Views: 9032
Reputation: 73357
This is not technically a duplicate, since in the question that has been marked as a duplicate, is about needing to mark FormsModule in ngModule
. But the case is similar. You need to mark the ReactiveFormsModule
in your ngModule
, not the component.
@NgModule({
imports: [ ReactiveFormsModule, ....],
// ....
})
Upvotes: 2