title: Inject service into class (not component) Angular2
body: <p>I am struggling to find a way to inject a service into an class object in angular2.</p>
  
  <p><strong>* NOTE: This is not a component, just a class. *</strong></p>
  
  <pre><code>export class Product {
  
    id: number;
    name: string;
    manufacturer: string;
  
    constructor(product: any) {
  
      this.id = product.id;
      this.name = product.name;
      this.manufacturer = product.manufacturer;
  
  }
  </code></pre>
  
  <p>The only solution I have come up with is to pass the service reference to the constructor whenever I create a new product... ie: instead of <code>new Product(product)</code> I would do <code>new Product(product, productService)</code> . This seems tedious and error prone. I would rather import the reference from the class and not messy up the constructor.</p>
  
  <p>I have tried the ReflectiveInjector:</p>
  
  <pre><code>let injector = ReflectiveInjector.resolveAndCreate([ProductService]);
  this.productService = injector.get(ProductService);
  </code></pre>
  
  <p>However, this creates an error <code>No provider for Http! (ProductService -&gt; Http) at NoProviderError.BaseError [as constructor]</code> (Also I'm pretty sure this creates a new productService when I simple want to reference my singleton that is instantiated at the app level).</p>
  
  <p>If anyone knows of a working solution I would be glad to hear it. For now i will pass the reference through the constructor.</p>
  
  <p>Thanks</p>