Move routes

This commit is contained in:
Oliver Davies 2019-03-14 09:11:14 +00:00
parent 8710946036
commit 690ad6ec67
2 changed files with 9 additions and 9 deletions

View file

@ -1,6 +1,7 @@
import Vue from 'vue'
import App from './App.vue' import App from './App.vue'
import router from './router' import routes from './routes'
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.config.productionTip = false Vue.config.productionTip = false
@ -14,7 +15,10 @@ Vue.component('navbar', Navbar);
Vue.component('sidebar', Sidebar); Vue.component('sidebar', Sidebar);
Vue.component('title-block', TitleBlock); Vue.component('title-block', TitleBlock);
Vue.use(VueRouter);
new Vue({ new Vue({
render: h => h(App), render: h => h(App),
router
router: new VueRouter(routes)
}).$mount('#app') }).$mount('#app')

View file

@ -1,12 +1,8 @@
import Applications from '@/views/Applications' import Applications from '@/views/Applications'
import Environment from '@/views/Environment' import Environment from '@/views/Environment'
import Environments from '@/views/Environments' import Environments from '@/views/Environments'
import Router from 'vue-router'
import Vue from 'vue'
Vue.use(Router) export default {
export default new Router({
routes: [ routes: [
{ {
path: '/', path: '/',
@ -26,4 +22,4 @@ export default new Router({
props: true, props: true,
} }
] ]
}) }