I have a very simple routing, my routes.ts is below. When I use vueRouterMode: 'history' in quasar.config.js, it works as intended. However, when I use vueRouterMode: 'hash', as it was by default, it doesn't. All the url load Home.vue as if url was '/', and even wrong urls aren't catched by the catchAll. How are you supposed to use vueRouterMode: 'hash' correctly?
import { RouteRecordRaw } from 'vue-router';
const routes: RouteRecordRaw[] = [
{
path: '/',
component: () => import('layouts/MainLayout.vue'),
children: [
{
path: '',
component: () => import('pages/Home.vue')
},
{
path: 'caisse',
children: [
{
path: '',
component: () => import('pages/CaisseListe.vue')
},
{
path: ':id',
component: () => import('pages/CaisseDetail.vue')
}
]
}
]
},
// Always leave this as last one,
// but you can also remove it
{
path: '/:catchAll(.*)*',
component: () => import('pages/ErrorNotFound.vue'),
},
];
export default routes;