0
You aren’t showing your router code.
Here is an example of mine:
{
path: '/search/:term/:page',
name: 'SearchPage',
secure: true,
component: SearchPage,
},
So in your case it may be something like:
{
path: '/job/:positionName/:jobID',
name: 'JobPage',
component: JobPage,
},
So you can see that I have two named parameters prepended with a colon (:).
Once I am on /search/{term}/{page}
I can access those Parameters within the page with what you have in the Data() return.
data() {
return {
positionName: this.$route.params.positionName,
id: this.$route.params.jobID
};
},
Source:stackexchange.com