Routing
Hosting at root of Vue app
const routes = [
{ path: '/', component: PhotoGallery, children: createRoutes() },
];
const router = createRouter({
history: createWebHashHistory(),
routes,
});
export default router;
Hosting on a subroute
The photo gallery can be easily displayed on a subroute.
const routes = [
{
path: '/photography',
component: PhotoGallery,
children: createRoutes(),
},
];
const router = createRouter({
history: createWebHashHistory(),
routes,
});
export default router;