Unable to get current page route,Expect a function import { getCurrentRoute } from 'vue-router' #1901
-
ReproductionUnable to get current page route Steps to reproduce the bugimport { getCurrentRoute } from 'vue-router' Expect a function from inside the vue-router getCurrentRoute() Whether vue-router provides such a function Expected behaviorimport { getCurrentRoute } from 'vue-router' Expect a function from inside the vue-router getCurrentRoute() Whether vue-router provides such a function Actual behaviorvue-router does not provide this function Additional informationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Remember to use discussions or the Discord server instead for questions next time 😉 |
Beta Was this translation helpful? Give feedback.
-
Use |
Beta Was this translation helpful? Give feedback.
Use
useRoute()
orrouter.currentRoute
https://router.vuejs.org/api/#Functions-useRoute