mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
34 lines
700 B
JavaScript
34 lines
700 B
JavaScript
import Vue from 'vue'
|
|
import Router from 'vue-router'
|
|
import DashboardLayout from '../views/Starter/SampleLayout.vue'
|
|
import Starter from '../views/Starter/SamplePage.vue'
|
|
|
|
Vue.use(Router)
|
|
|
|
export default new Router({
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
name: 'home',
|
|
redirect: '/dashboard',
|
|
component: DashboardLayout,
|
|
children: [
|
|
{
|
|
path: 'dashboard',
|
|
name: 'dashboard',
|
|
components: { default: Starter },
|
|
},
|
|
],
|
|
},
|
|
],
|
|
scrollBehavior: (to, from, savedPosition) => {
|
|
if (savedPosition) {
|
|
return savedPosition
|
|
}
|
|
if (to.hash) {
|
|
return { selector: to.hash }
|
|
}
|
|
return { x: 0, y: 0 }
|
|
},
|
|
})
|