title: Nswag Typescript API client InjectionToken is not being resolved
body: <p>I'm using Nswag to generate an API client for an external asp.net core service. In this generated client I have </p>
  
  <pre><code>export const API_BASE_URL = new InjectionToken&lt;string&gt;('API_BASE_URL');
  </code></pre>
  
  <p>I want to resolve this. </p>
  
  <p>In my app.module.ts I added.</p>
  
  <pre><code>providers: [
    AuthGuardService,
    AuthService,
    {
      provide: GeneratedAPIClient.API_BASE_URL,
      useValue: environment.API_BASE_URL
    }
  ]
  </code></pre>
  
  <p>In the constructor of my AuthService I'm trying to use this API Client like this.</p>
  
  <pre><code>constructor(
    private router: Router, 
    private http: HttpClient) {
      const client = new GeneratedAPIClient.AccountClient(this.http);
  
      client.userinfo().subscribe((userInfoData) =&gt; {
           // stuff
      });
  }
  </code></pre>
  
  <p>In environment.ts I have</p>
  
  <pre><code>export const environment = {
    production: false,
    API_BASE_URL: 'http://localhost:5000'
  };
  </code></pre>
  
  <p>when running the application with <code>ng serve</code> the API always uses the base address for the angular project, that is <code>http://localhost:4200</code> and not what I have in the <code>environment.ts</code> file.</p>
  
  <p>What have I missed?</p>
  
  <p>UPDATE: Clarification: I have a separate asp.Net core API that I am trying to access from Angular. The separate API is on port 5000. Angular is on port 4200. So I am not looking to change angulars port.</p>