This commit is contained in:
2020-07-30 18:39:37 +02:00
parent f95fe42c7f
commit e21bc0782c
11 changed files with 101 additions and 55 deletions

View File

@ -9,28 +9,31 @@
import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../views/Home.vue';
import About from '../views/About.vue';
import AppView from '../views/AppView.vue';
import NotFound from '../views/NotFound.vue';
Vue.use (VueRouter);
const routes = [
{
path: '/',
name: 'Home',
component: Home
path: '/app/:id',
name: 'AppView',
component: AppView
},
{
path: '/about',
name: 'About',
component: About
}
path: '/404',
name: '404',
component: NotFound
},
{ path: '*', redirect: '404' }
];
const router = new VueRouter ({
mode: 'history',
base: process.env.BASE_URL,
routes
mode: 'history',
// eslint-disable-next-line no-process-env
base: process.env.BASE_URL,
routes,
fallback: true
});
export default router;