This is how to use routing in the template Component.vue:
<router-link :to="{ name: 'club' }"> <lazy-image src="club.jpg" class="club_class" alt="Club alt" /> </router-link>
This is how it is defined in router.js:
const routes = [ { path: '/s/site', name: 'club', component: () => import('./_pages/Club'), }, ]; export default routes;
I need to add a static parameter to the link like this:
'?foo=bar'
I tried hardcoding it in Component.vue with no success. Should I define it as param in router.js or somewhere else?
Use this code: