My app only has two kinds of URLs: / (root URL) and /id (for example: /something). But now I need to allow two parameters separated by a hash character, like this: /something/param1/#/param2.
So in my nuxt.config.js I added:
router: {
extendRoutes(routes, resolve) {
routes.push({
path: '/:id/:location/#/:action',
components: {
default: resolve(__dirname, 'pages/_id')
},
chunkNames: {
modal: 'pages/_id'
}
})
}
}
But then /something/param1/#/param2 URL gives a 404 page..
If instead I do:
routes.push({
path: '/:id/:location/hash/:action'
})
...and try the URL /something/param1/hash/param2 then it works fine. But, I want to use # between my two other parameters in the URL, not hash or anything else.
Any idea if this is possible and how to achieve it?