I have an app with 2 main modules, web and admin.
Admin declares
providers: [
{
provide: DISPLAY_LIFE_TOKEN,
useValue: 6000,
},
],
and web declares the same token with useValue: 10000
.
Both modules contain a route and components that use a service with providedIn: 'root',
that imports the token DISPLAY_LIFE_TOKEN
.
Yet in the service, the config value is always 10000
even when calls come from the admin module.
See demo.
Did i misunderstand something about injectionTokens and providers, or is there another preferred way to set a module wide config?