Angular2 simple DI not working
<p>I have the following angular2 app with a simple dependency injected and it doesn't work.  What am I missing? </p>

<p>Here's the error:</p>

<pre><code>EXCEPTION: Cannot resolve all parameters for 'AppComponent'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'AppComponent' is decorated with Injectable.
</code></pre>

<p>and the code:</p>

<pre><code>import {Component} from 'angular2/core';
import {bootstrap} from 'angular2/platform/browser';

class DataService {
    items: Array&lt;any&gt;;

    constructor() {
        this.items = [
            { name: 'Christoph Burgdorf' },
            { name: 'Pascal Precht' },
            { name: 'thoughtram' }
        ];
    }

    getItems() {
        return this.items;
    }
}


@Component({
    selector: 'app',
    providers: [DataService],
    template: `
    &lt;ul&gt;
      &lt;li *ngFor="#item of items"&gt;{{item.name}}&lt;/li&gt;
    &lt;/ul&gt;
  `
})
class AppComponent {
    items: Array&lt;any&gt;;
    constructor(dataService: DataService) {
        this.items = dataService.getItems();
    }
}

bootstrap(AppComponent, []);
</code></pre>