title: Angular 2 service injection using TypeScript 1.5
body: <p>I'm trying to get a very basic, functional structure set up for Angular 2.  It will have only the most basic API elements so that as the framework advances, I can advance my structure.</p>
  
  <p>Currently, I'm at my wit's end as to how to perform the simple act of passing services.  Here is some example source, taken right from the comments of the most recent DefinitelyTyped file:</p>
  
  <pre><code>class Greeter {
      greet(name: string) {
          return 'Hello ' + name + '!';
      }
  }
  @Component({
      selector: 'greet',
      appInjector: [Greeter]
  })
  @View({
      template: `{{greeter.greet('world')}}!`
  })
  class HelloWorld {
      greeter: Greeter;
      constructor(greeter: Greeter) {
          this.greeter = greeter;
      }
  }
  bootstrap(HelloWorld);
  </code></pre>
  
  <p>As you can see, I'm using Typescript 1.5 in this example.</p>
  
  <p>I have tried to inject the <code>Greeting</code> service in the Component annotation using <code>hostInjector</code>, <code>injectibles</code> and <code>appInjector</code>.  I've also tried adding it to the second argument of the bootstrap call, as in <code>bootstrap(HelloWorld, [Greeter])</code>.</p>
  
  <p>In all cases I get this error message when trying to run it in the browser:</p>
  
  <p><strong>Error during instantiation of Token(ComponentRef)!. ORIGINAL ERROR: Cannot resolve all parameters for HelloWorld(?). Make sure they all have valid type or annotations.</strong></p>
  
  <p>Of course, if I remove <code>greeter: Greeter</code> argument from the constructor, the error in question goes away and is replaced by other, expected errors further down the chain.</p>
  
  <p>Ideas?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I updated the title of this question to specify that I am using TypeScript 1.5</p>