title: Inject Angular service in constructor of app.module in Hybrid Angular app
body: <p>I am looking at an Angular hybrid app and its new for me.</p>
  <p>Its app.module.ts has providers with upgraded AngularJS services under providers[..]:</p>
  <p>It has UpgradeModule injected as:</p>
  <pre><code>constructor(
      private upgrade: UpgradeModule
  ) { }
  </code></pre>
  <p>Then, there is the following:</p>
  <pre><code>ngDoBootstrap() {
      const strictDi = typeof this.strictDi === 'boolean' ? this.strictDi : true;
      this.upgrade.bootstrap(document.documentElement, ['app'], { strictDi });
  }
  </code></pre>
  <p>I have an Angular service - AuthTokenService.ts</p>
  <pre><code>@Injectable
  export class AuthTokenService ... {
  ..
  }
  </code></pre>
  <p>I have a need where I want to inject this service AuthTokenService in app.module.ts constructor (to do some processing/check at that level before loading app)
  However, it looks like in hybrid Angular, I cannot simply inject it as:</p>
  <pre><code>constructor(
    private upgrade: UpgradeModule,
    private authTokenService: AuthTokenService   // this is how I am trying to inject
  ) { }
  </code></pre>
  <p>When I load the app, it gives an error - <code>Trying to get the AngularJS injector before it being set.</code></p>
  <p>Any idea if and how I can inject an Angular service in the constructor of app.module.ts in a hybrid Angular app?</p>