title: Angular 2+, How to read environment variable in module (webpack)
body: <p>I don't know how I can read my environment variable. I'm initializing my <strong>APP_INITIALIZER</strong> here in app.module.browser.ts, </p>
  
  <pre><code>  @NgModule({
    bootstrap: [AppComponent],
    imports: [
      BrowserModule,
      AppModuleShared,
      AppAuthModule
    ],
    declarations: [],
    providers: [
      { provide: 'BASE_URL', useFactory: getBaseUrl },
      {
        provide: APP_INITIALIZER, // &lt;-- HERE
        useFactory: configurationServiceFactory,
        deps: [ConfigurationService],
        multi: true
      },
      {
        provide: HTTP_INTERCEPTORS,
        useClass: TokenInterceptor, //AuthInterceptor,
        multi: true
      }
      ConfigurationService,
      ErrorLogService
    ]
  </code></pre>
  
  <p>After this initialization, I'm having some constant variables. I want to read my environment variable. So I can put this into <strong>condition</strong> and I can import my module depending my condition like this.</p>
  
  <pre><code>import { AccountsComponent } from "./customerList/components/accounts/accounts.component";
  import { AccountsPlusComponent } from "./customerList/components/accounts-plus/accounts-plus.component";
  
  let accountsInjection: any = ENV_VARIABLE ? AccountsComponent : AccountsPlusComponent;
  
  @NgModule({
    declarations: [
      accountsInjection
    ],
    imports: [
  ...
  </code></pre>
  
  <h2>NOTE: I don't have app/environments/ folder in my project... (I'm still looking a way to put it)</h2>
  
  <p>Edit: I also want to give extra information, I'm using WEBPACK, should I use another method to get my Envarionment variables?</p>