title: AngularJS 2 - Can't load component
body: <p>I'm trying to import a component inside 'app.component.ts' which is the main component which will run on the application start.</p>
  
  <p>Here it is a simplified piece of code of app.component.ts.</p>
  
  <pre><code>    import {Component} from 'angular2/core';
      import {ContactListComponent} from './contacts/contact-list.component';
  
      @Component({
          selector: 'my-app',
          template: `Hello`,
          directives: [ContactListComponent],
      })
  
  export class AppComponent {}
  </code></pre>
  
  <p>I get an error on the second import, when I go to browser console I see this error:</p>
  
  <p><a href="https://i.stack.imgur.com/n8L0y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n8L0y.png" alt="enter image description here"></a></p>
  
  <p>My index.html looks like this:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Angular 2 application&lt;/title&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;!-- 1. Load libraries --&gt;
      &lt;!-- IE required polyfills, in this exact order --&gt;
      &lt;script src="node_modules/es6-shim/es6-shim.min.js"&gt;&lt;/script&gt;
      &lt;script src="node_modules/systemjs/dist/system-polyfills.js"&gt;&lt;/script&gt;
      &lt;script src="node_modules/angular2/bundles/angular2-polyfills.js"&gt;&lt;/script&gt;
      &lt;script src="node_modules/systemjs/dist/system.src.js"&gt;&lt;/script&gt;
      &lt;script src="node_modules/rxjs/bundles/Rx.js"&gt;&lt;/script&gt;
      &lt;script src="node_modules/angular2/bundles/angular2.dev.js"&gt;&lt;/script&gt;
      &lt;script src="node_modules/angular2/bundles/router.dev.js"&gt;&lt;/script&gt;
      &lt;script src="node_modules/angular2/bundles/http.js"&gt;&lt;/script&gt;
      &lt;!-- 2. Configure SystemJS --&gt;
      &lt;script&gt;
          System.config({
              packages: {
                  app: {
                      format: 'register',
                      defaultExtension: 'js'
                  }
              }
          });
          System.import('app/boot')
                  .then(null, console.error.bind(console));
      &lt;/script&gt;
  
      &lt;link rel="stylesheet" href="src/css/app.css"&gt;
  &lt;/head&gt;
  &lt;!-- 3. Display the application --&gt;
  &lt;body&gt;
  &lt;my-app&gt;Loading...&lt;/my-app&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>