the code like as bellow
const isDev = isDevMode()
const modules = [
HttpClientModule,
NgxsModule.forRoot(AllStates, { developmentMode: isDev }),
]
this code work well in development env, but will throw an error in prod env.
The error is Error during template compile of 'CoreModule'
Function calls are not supported in decorators but 'isDevMode' was called.
Is there a way to pass isDevMode to forRoot function? Thanks
Finally, I use const isDev = !environment.production , and work well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With