title: Angular 6 "Can't bind to 'ngModel' since it isn't a known property of 'input'."
body: <p>Theres a bunch of people who already asked this question but I already followed every answer by importing it in my app.module.ts file and even imported it in app.spec.ts file</p>
  
  <p>heres the html file:</p>
  
  <pre><code>&lt;p&gt;{{ randomWord }}&lt;/p&gt;
  &lt;input type="text" [(ngModel)]="enteredValue"&gt;
  &lt;button (click)="onSubmit()" &gt;Submit&lt;/button&gt;
  &lt;p&gt;{{ answer }}&lt;/p&gt;
  </code></pre>
  
  <p>heres the app.module.ts file:</p>
  
  <pre><code>import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  import { FormsModule } from '@angular/forms';
  
  
  import { AppComponent } from './app.component';
  import { TestComponent } from './test/test.component';
  
  
  import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  import { FormsModule } from '@angular/forms';
  
  
  import { AppComponent } from './app.component';
  import { TestComponent } from './test/test.component';
  
  
  @NgModule({
    declarations: [
      AppComponent,
      TestComponent,
      FormsModule
    ],
    imports: [
      BrowserModule
    ],
    providers: [],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>