title: How to inject HttpClient in static method or custom class?
body: <p>I'd like to use angular <code>HttpClient</code> in static method or class (in class it can't be defined as constructor parameter).</p>
  
  <p>I tried something like:</p>
  
  <pre><code>export class SomeNotInjectableService {
    static doSomething() {
      const injector = Injector.create({
        providers: [{provide: HttpClient, deps:[]}]
      });
      const httpClient: HttpClient = injector.get(HttpClient);
  
      httpClient.request(...); // error Cannot read property 'handle' of undefined
    }
  }
  </code></pre>
  
  <p>this is a try of injecting manually the client in static service method. Doesn't work. I'm curious how to do this or how to inject the client in normal method but in a class which isn't a component.</p>