How can I access the route in the store.js file?
I want access to path and fullPath in store.js.
How can I access the route in the store.js file?
I want access to path and fullPath in store.js.
in your store, try with:
this.app.router;
// for example :
this.app.router.push('/');
In this case:
const correntPathInfo = this.app.router.currentRoute;
console.log(correntPathInfo);
Check this issues doc:
You should be able to access fullPath inside store in Nuxt.js as below
fullPath: this.$router.currentRoute.fullPath
query: this.$router.currentRoute.query
Hope this will help you!