All values that I set via the services are correctly set as app.[key]. But with the decorators it happens that a value is saved as ngx-webstorage|[key]. So it seems that decorators use the default configuration of the module.
I suspect a race condition but how can I avoid it?
The NgxWebstorageModule.forRoot() is loaded directly into the CoreModule of my app as the first module.
To Reproduce
Unfortunately, I cannot simply reproduce the problem myself in a simple example, since it does not occur here.
Has anyone ever noticed the problem?
Expected behavior
I expect that all values are set either by service or by decorator should use the given configuration to create their keys.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]
Additional context
The application in which it occurs has a bunch of lazy-loaded modules, uses a CoreModule for all forRoot modules that only need to be instantiated once in the AppModule and a SharedModule that is shared with the lazy modules.
Even when I put the NgxWebstorageModule.forRoot() in the app.module at the very beginning of the imports, the issue stays the same.
Versions (please complete the following information):
Describe the bug Decorators do not always take into account the module configuration in the forRoot.
I configured the NgxWebstorageModule like this:
All values that I set via the services are correctly set as
app.[key]
. But with the decorators it happens that a value is saved asngx-webstorage|[key]
. So it seems that decorators use the default configuration of the module. I suspect a race condition but how can I avoid it? TheNgxWebstorageModule.forRoot()
is loaded directly into the CoreModule of my app as the first module.To Reproduce Unfortunately, I cannot simply reproduce the problem myself in a simple example, since it does not occur here.
Has anyone ever noticed the problem?
Expected behavior I expect that all values are set either by service or by decorator should use the given configuration to create their keys.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context The application in which it occurs has a bunch of lazy-loaded modules, uses a CoreModule for all forRoot modules that only need to be instantiated once in the AppModule and a SharedModule that is shared with the lazy modules. Even when I put the
NgxWebstorageModule.forRoot()
in the app.module at the very beginning of the imports, the issue stays the same.