title: Uncaught Error: Unexpected module 'FormsModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component annotation
body: <p>I'm new in Angular. I started Tour of Heroes to learn it.
  So, I am created an <code>app.component</code> with <code>two-way</code> binding. </p>
  
  <pre><code>import { Component } from '@angular/core';
  export class Hero {
      id: number;
      name: string;
  }
  @Component({
      selector: 'app-root',
      template: `
          &lt;h1&gt;{{title}}&lt;/h1&gt;
          &lt;h2&gt;{{hero.name}}  details!&lt;/h2&gt;
          &lt;div&gt;&lt;label&gt;id: &lt;/label&gt;{{hero.id}}&lt;/div&gt;
          &lt;div&gt;&lt;label&gt;Name: &lt;/label&gt;
              &lt;input [(ngModel)]="hero.name" placeholder="Name"&gt;
          &lt;/div&gt;
      `,
      styleUrls: ['./app.component.css']
  })
  export class AppComponent {
      title = 'Tour of Heroes';
      hero: Hero = {
          id: 1,
          name: 'Windstorm'
      };
  }
  </code></pre>
  
  <p>Following the tutorial I imported FormsModule and added it into declarations array. Error appeared at this step:</p>
  
  <pre><code>import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  import { AppComponent } from './app.component';
  import { FormsModule } from '@angular/forms';
  
  @NgModule({
    declarations: [
        AppComponent,
        FormsModule
    ],
    imports: [
      BrowserModule
    ],
    providers: [],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>
  
  <p>Here is error: </p>
  
  <blockquote>
    <p>Uncaught Error: Unexpected module 'FormsModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component annotation.</p>
  </blockquote>