Created
May 11, 2021 14:10
-
-
Save mattcdavis1/45bad16b233b9c2281dc1bf32c64e9f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createRouter, createWebHistory } from 'vue-router' | |
import Projects from '~/vue/app/projects/index' | |
import Dashboard from '~/vue/app/dashboard/index' | |
import ProjectDetail from '~/vue/app/projects/detail' | |
import ProjectCreate from '~/vue/app/projects/create' | |
const routes = [ | |
{ | |
path: '/', | |
redirect: '/projects', | |
}, | |
{ | |
path: '/dashboard', | |
name: 'dashboard', | |
components: { | |
default: Dashboard, | |
}, | |
}, | |
{ | |
path: '/projects', | |
name: 'projects', | |
components: { | |
default: Projects, | |
}, | |
}, | |
{ | |
path: '/projects/create', | |
name: 'projects.create', | |
components: { | |
default: ProjectCreate, | |
}, | |
meta: { parent: 'projects' } | |
}, | |
{ | |
path: '/projects/:id', | |
name: 'projects.detail', | |
component: ProjectDetail, | |
meta: { parent: 'projects' } | |
} | |
] | |
export default createRouter({ | |
history: createWebHistory('/app'), | |
routes, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment