hi,
i have a js file:
index.js
import {createRouter, createWebHistory} from ‘vue-router’
import routes from ‘./routes.js’
import store from ‘…/store’
const router = createRouter({
linkActiveClass: “active”,
history: createWebHistory(),
routes
});
export default router;
and router.js:
export default [
{
path: ‘/404’,
component: err404,
name: ‘404’,
},
{
path: ‘/test’,
component: Test,
name: ‘test’,
meta: {
title: ‘Test’,
id: 0
}
},
]
in app.js i have:
import router from ‘./router’;
export const app = createApp(App);
app.use(router);
it’s possible to pass $route.params.id in router.js ??
br
Max