Add basic routes, fake components
This commit is contained in:
parent
27874adf27
commit
4db21e945a
|
|
@ -1,5 +1,6 @@
|
|||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import HomeView from '../views/HomeView.vue'
|
||||
import learningPathRoutes from './learningpath.routes'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
|
|
@ -16,6 +17,11 @@ const router = createRouter({
|
|||
// this generates a separate chunk (About.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import('../views/AboutView.vue')
|
||||
},
|
||||
{
|
||||
path: '/learningpath',
|
||||
component: () => import('../views/LearningPath.vue'),
|
||||
children: learningPathRoutes
|
||||
}
|
||||
]
|
||||
})
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
const LearningPathOverview = () => import('../views/LearningPathOverview.vue')
|
||||
|
||||
export default [
|
||||
{
|
||||
path: ':id',
|
||||
component: LearningPathOverview,
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<template>
|
||||
<h1>Lernpfad</h1>
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'LearningPath'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
<h1>Lernpfad Overview</h1>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'LearningPathOverview'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
|
@ -9,6 +9,11 @@ export default defineConfig({
|
|||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
},
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/foo': 'http://localhost:4567',
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue