0

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]

Tristan Hessell
  • 930
  • 10
  • 21
  • 1
    Possible duplicate of [Angular 2: Can't bind to 'ngModel' since it isn't a known property of 'input'](https://stackoverflow.com/questions/38880150/angular-2-cant-bind-to-ngmodel-since-it-isnt-a-known-property-of-input) – anteAdamovic Nov 10 '17 at 00:07
  • Please add more code describing your situation. Paste component.ts and component.html files here. – Vitalii Chmovzh Nov 10 '17 at 00:07

1 Answers1

2

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, ....],
  // ....
})
AT82
  • 71,416
  • 24
  • 140
  • 167