avatar
access route parameters in Vue.js Vue

» router.js

{
    path: 'category/:id',
    name: 'category_detail',
    component: () => import(/* webpackChunkName: "f6299e60d673378e1e0fd646fe039edb" */'./views/front/Category.vue')
},

» Category.vue

console.log(this.$route.params.id) 

For example: `$route.params.id` would be 'software' in this specific context if you access the URL as 'http://flagtick.com/category/software'.

24
full path in Vue component
You need to login to do this manipulation!