title: Angular DI: Injecting a value token into factory provider
body: <p>Is it possible to inject an InjectionToken into a factory provider:</p>
  
  <p>Currently, I've coded that:</p>
  
  <pre><code>export const HOST_TOKEN = new InjectionToken&lt;string&gt;("host");
  
  let configDataServiceFactory = (userService: UserService, host: string) =&gt; {
      return new Config("host", 8080, userService.getUser(), userService.getPasswd());
  };
  
  export let configDataServiceProvider =
  {
      provide: CONFIG_API,
      useFactory: configDataServiceFactory,
      deps: [UserService, HOST_TOKEN]
  };
  </code></pre>
  
  <p>Into my module:</p>
  
  <pre><code>@NgModule(
    providers: [
      {provide: HOST_TOKEN, useValue: "allianz-host"},
      configDataServiceProvider
    ]
  )
  </code></pre>
  
  <p>Nevertheless, angular is injecting on <code>configDataServiceProvider</code> value <code>"host"</code>, instead of <code>"host-allianz"</code></p>
  
  <p>Any ideas?</p>