2

I'm trying to use NgModel inside a

<input [(NgModel)]="studiedSubject.value">

And I get : Uncaught Error: Template parse errors: Can't bind to 'NgModel' since it isn't a known property of 'input'

I saw there is a lot of answers on this and I tried them all

in app.module.ts

imports: [
BrowserModule,
FormsModule,
HttpModule,
ReactiveFormsModule,
FormsModule],

declarations: [
AppComponent,
MainComponent,
SearchComponent,
MyStudentComponent     
],

providers: [PlayerService],
bootstrap: [AppComponent]
})

in my-student.component.ts

import { FormsModule, ReactiveFormsModule } from '@angular/forms';

I tried to delete node_modules directory and re install its content with npm install, I tried the same thing after getting last angular cli etc..

Thanks for not tagging this question as duplicate as I wrote that I saw there is already lots of answers on this and I tried them all, also you marked it as duplicate of an answer saying to import formsModule, it's clear that I imported it..

q.b
  • 59
  • 2
  • 3
  • 7

0 Answers0