Skip to content

Instantly share code, notes, and snippets.

@felisio
Created November 10, 2016 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felisio/33e03e99fdf35b8c1c01221a7d442379 to your computer and use it in GitHub Desktop.
Save felisio/33e03e99fdf35b8c1c01221a7d442379 to your computer and use it in GitHub Desktop.
import Vue from 'vue'
import App from './App'
import VueRouter from 'vue-router'
import Hello from './components/Hello.vue'
import Comp from './components/Comp.vue'
Vue.use(VueRouter)
const routers = [
{ path: '/hello', component: Hello },
{ path: '/comp', component: Comp }
]
const router = new VueRouter({ routers })
/* eslint-disable no-new */
new Vue({
router,
render: h => h(App)
}).$mount('#app')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment