I've been trying to get access to the meta
field in this.$route
in the 404.vue
page component. I copied the extendedRoutes example from here and appended meta
like below:
module.exports = {
router: {
extendRoutes (routes, resolve) {
routes.push({
name: 'custom',
path: '*',
component: resolve(__dirname, 'pages/404.vue'),
meta: { name: 'Pumpkin', age: 19 }
})
}
}
}
I'm getting undefined when we access the above name
variable using meta property. Although, the vue-router documentation says we can access it correctly here