Open CodyBontecou opened 3 years ago
Say I have a page example.vue with the following <router> property:
example.vue
<router>
<router> alias: - path: '/event/:id' - path: '/:username/:eventName/:eventCount' </router>
My generated router.js looks like:
{ path: '/example', component: _4e18dbd1, name: 'example', }, { path: '/event/:id', component: _4e18dbd1, name: 'example/event/:id', }, { path: '/:username/:eventName/:eventCount', component: _4e18dbd1, name: 'example/:username/:eventName/:eventCount', },
Is it possible to remove the /example route altogether? Or is the expected solution to this to create an example/event/_id.vue file with the router logic placed in there?
/example
example/event/_id.vue
Hey, Sorry for the late response You can use path option instead of alias to change the route itself
path
<router> path: '/event/:id' alias: - path: '/:username/:eventName/:eventCount' </router>
Say I have a page
example.vue
with the following<router>
property:My generated router.js looks like:
Is it possible to remove the
/example
route altogether? Or is the expected solution to this to create anexample/event/_id.vue
file with the router logic placed in there?