0👍
You can access your params
from Context.
Context
is available in special nuxt lifecycle areas like asyncData
, fetch
, plugins
, middleware
and nuxtServerInit
.
- [Vuejs]-How can i use computed property in v-for
- [Vuejs]-Radiobutton-like behaving Vue.js components
-1👍
In Nuxt, with asyncData hook you can get query parameters from the route context key.
Please read the Nuxt.js Context documentation. The context provides additional objects/params from Nuxt to Vue components
With your-domain/?user=wonderman
asyncData({ route: { query: queryParams} }) {},
variable queryParams is an object:
{ user: "wonderman" }
Source:stackexchange.com