1π
β
You should be able to use it like this:
this.$route.params.code
0π
In the component, You can use this:
User {{ $route.params.getUserName }}
Route.js
{
path: "/@:getUserName",
name: "profile",
component: () => import("../views/ProfileView.vue"),
}
Source:stackexchange.com