title: Unexpected value 'AnyComponent' declared by the module 'AppModule'
body: <p>I'm using Angular2 and I got this problem when tryng to use two classes in the same Typescript file.</p>
  
  <p>At compile time doesn't give me any error but when I try to execute the page the console.log is giving this error:</p>
  
  <pre><code>Error: BaseException@http://www.my.app/panel-module/node_modules/@angular/compiler//bundles/compiler.umd.js:5116:27
      CompileMetadataResolver&lt;/CompileMetadataResolver.prototype.getNgModuleMetadata/&lt;@http://www.my.app/panel-module/node_modules/@angular/compiler//bundles/compiler.umd.js:13274:35
      CompileMetadataResolver&lt;/CompileMetadataResolver.prototype.getNgModuleMetadata@http://www.my.app/panel-module/node_modules/@angular/compiler//bundles/compiler.umd.js:13261:21
      RuntimeCompiler&lt;/RuntimeCompiler.prototype._compileComponents@http://www.my.app/panel-module/node_modules/@angular/compiler//bundles/compiler.umd.js:15845:28
      RuntimeCompiler&lt;/RuntimeCompiler.prototype._compileModuleAndComponents@http://www.my.app/panel-module/node_modules/@angular/compiler//bundles/compiler.umd.js:15769:36
      RuntimeCompiler&lt;/RuntimeCompiler.prototype.compileModuleAsync@http://www.my.app/panel-module/node_modules/@angular/compiler//bundles/compiler.umd.js:15746:20
      PlatformRef_&lt;/PlatformRef_.prototype._bootstrapModuleWithZone@http://www.my.app/panel-module/node_modules/@angular/core//bundles/core.umd.js:9991:20
      PlatformRef_&lt;/PlatformRef_.prototype.bootstrapModule@http://www.my.app/panel-module/node_modules/@angular/core//bundles/core.umd.js:9984:20
      @http://www.my.app/panel-module/app/main.js:4:1
      @http://www.my.app/panel-module/app/main.js:1:31
      @http://www.my.app/panel-module/app/main.js:1:2
      Zone&lt;/ZoneDelegate&lt;/ZoneDelegate.prototype.invoke@http://www.my.app/panel-module/node_modules/zone.js/dist/zone.js:332:20
      Zone&lt;/Zone&lt;/Zone.prototype.run@http://www.my.app/panel-module/node_modules/zone.js/dist/zone.js:225:25
      scheduleResolveOrReject/&lt;@http://www.my.app/panel-module/node_modules/zone.js/dist/zone.js:586:53
      Zone&lt;/ZoneDelegate&lt;/ZoneDelegate.prototype.invokeTask@http://www.my.app/panel-module/node_modules/zone.js/dist/zone.js:365:24
      Zone&lt;/Zone&lt;/Zone.prototype.runTask@http://www.my.app/panel-module/node_modules/zone.js/dist/zone.js:265:29
      drainMicroTaskQueue@http://www.my.app/panel-module/node_modules/zone.js/dist/zone.js:491:26
      F/&lt;/g@http://www.my.app/panel-module/node_modules/core-js/client/shim.min.js:8:10016
      F/&lt;@http://www.my.app/panel-module/node_modules/core-js/client/shim.min.js:8:10138
      a.exports/k@http://www.my.app/panel-module/node_modules/core-js/client/shim.min.js:8:14293
  
      Evaluating http://www.my.app/panel-module/app/main.js
      Error loading http://www.my.app/panel-module/app/main.js
  </code></pre>
  
  <p>Below is my component typescript file.</p>
  
  <p>// MyComponent.ts</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  
  @Component({
    selector: 'my-app',
    templateUrl: '/path/to/view',
  })
  
  export class MyObject {
    id: number;
  }
  
  
  export class MyComponent {
     obj: MyObject;
  
     // unecessary code
  }
  </code></pre>