Angular InjectionToken in NgModule import array?

367 Views Asked by At

I need to use the environment.production flag in an import array of a NgModule:

@NgModule({
  import: [
    ...
    !environment.production ? StoreDevtoolsModule.instrument() : [],
  ]
}

But we've multiple possible environment files at this time, that's why we use an InjectionToken in other parts of the code.

Is there a possibility to use the injection token in the import array?

0

There are 0 best solutions below