title: Angular2: Need to add provider in component for dependency on service?
body: <p>I'm having some trouble understanding the logic that Angular2 uses when it comes to dependency injection. This is my situation:</p>
  
  <p><strong>app.component.ts:</strong></p>
  
  <pre><code>import {Component} from 'angular2/core';
  import {Demo1Service} from './demo-1.service';
  
  @Component({
      selector: 'app',
      template: `&lt;div&gt;test template&lt;/div&gt;`,
      providers: [Demo1Service]
  })
  class AppComponent {
      constructor(private _demo1Service: Demo1Service) {}
  }
  
  export {AppComponent};
  </code></pre>
  
  <p><strong>demo-1.service.ts</strong></p>
  
  <pre><code>import {Injectable} from 'angular2/core';
  import {Data1Store} from './data-1.store';
  
  @Injectable()
  class Demo1Service {
      constructor(private _data1Store: Data1Store) {}
  };
  
  export {Demo1Service};
  </code></pre>
  
  <p><strong>data-1.store.ts</strong></p>
  
  <pre><code>import {Injectable} from 'angular2/core';
  
  @Injectable()
  class Data1Store {}
  
  export {Data1Store};
  </code></pre>
  
  <p><a href="http://plnkr.co/edit/4aBNbAxtHbUvVqxPRUbv?p=preview" rel="nofollow">http://plnkr.co/edit/4aBNbAxtHbUvVqxPRUbv?p=preview</a></p>
  
  <p>If you run this plunker you will see that Angular needs a provider for the Data1Store to be defined in the AppComponent. In order to have some separation of concerns, I would prefer that the AppComponent doesn't need to know about the existence of the Data1Store.</p>
  
  <p>Is there something I'm here?</p>