src/router.js
import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
Vue.use(Router)
export default new Router({
mode: 'history',
base: process.env.BASE_URL,
scrollBehavior() {
return { x: 0, y: 0 };
},
routes: [
{
path: '/',
name: 'home',
component: Home
},
{
path: '*',
name: 'home',
component: Home
},
{
path: '/home',
name: 'home',
component: Home
},
{
path: '/about',
name: 'about',
component: () => import('./views/About.vue')
},
{
path: '/achievements',
name: 'achievements',
component: () => import('./views/Achievements.vue')
},
{
path: '/team',
name: 'team',
component: () => import('./views/Team.vue')
},
{
path: '/contact',
name: 'contact',
component: () => import('./views/Contact.vue')
},
{
path: '/terms_services',
name: 'terms_services',
component: () => import('./views/Terms&Services.vue')
},
{
path: '/privacy_policy',
name: 'privacy_policy',
component: () => import('./views/PrivacyPolicy.vue')
}
]
})