Move routes
This commit is contained in:
parent
8710946036
commit
690ad6ec67
10
src/main.js
10
src/main.js
|
@ -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')
|
||||||
|
|
|
@ -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,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
}
|
Reference in a new issue