Ability to reset _appConfig
to its initial values defined in app.config.ts
#27609
tommykamkcm
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there, just want to bring up an idea to add to the app config, see if it's making sense.
Imagine you're building a multi-tenant site with frontend features being able to be turned on and off from CMS:
The initial config is defined in
app.config.ts
, both feature 1 and 2 are OFF.When a user selects (and manages data for) Tenant A, the app will fetch the tenant info (a.k.a remote config) from an API, and then call
updateAppConfig()
to apply the remote config i.e. merging init config with the remote one. As a result, the user can only use feature 1 but not feature 2 as it's turned OFF.When the user has exited from Tenant A, I'd like to reset the app config to its initial values i.e. those defined in
app.config.ts
so that the user will not be able to see feature 1 and 2 available. I reckon it's not possible to do it at this moment.It'd be great if the Nuxt team could consider adding a new function called
resetAppConfig()
in the future.Beta Was this translation helpful? Give feedback.
All reactions