Access route in store.js (Vuex/Nuxt)

Viewed 4575

How can I access the route in the store.js file?

I want access to path and fullPath in store.js.

2 Answers

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!

Related