Based on this from vue-routers site it seems as though you can pass an object as a prop. However, everytime I try to do this it seems to it fail saying invalid param
My route is defined as follows:
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
component: () => import('../layouts/DashboardLayout.vue'),
meta: {
requiresAuth: true,
},
children: [
{
path: '/upload',
name: 'Upload Review',
component: () => import('../pages/CertificationUploadPage.vue'),
props: { mode: 'manual'}
},
],
},
// default redirect to home page
{
path: '/:pathMatch(.*)*',
redirect: '/error',
meta: {
requiresAuth: true,
}
},
{ path: '/:pathMatch(.*)*',
redirect: '/login',
meta: {
requiresAuth: false,
}
}
]
})
I programmatically push a new page using this:
router.push({ name: 'Upload Review', params : {mode: 'email'} })
I am curious if I can also go one step further and pass a nested object with some additional data I want to get to the next page/component or would I have to use pinia for that?