Accessing $route.params in VueJS

后端 未结 1 647
有刺的猬
有刺的猬 2021-02-11 21:50

Looking through this documentation: https://router.vuejs.org/en/essentials/navigation.html

It looks like you can bind the

相关标签:
1条回答
  • 2021-02-11 22:43

    If you're using the Vue Loader setup (which has <template></template> tags in the files), you need to use this to reference the $router, if you're doing so within the <script></script> part of the file.

     console.log('The id is: ' + this.$route.params.id);
    
    0 讨论(0)
提交回复
热议问题