Sujan.Prajapati
Sujan.Prajapati

Reputation: 1

Angular Js 2 - Can't bind to 'formControl' since it isn't a known property of 'input'

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

Answers (1)

AVJT82
AVJT82

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

Related Questions