Skip to content

Instantly share code, notes, and snippets.

@nanotroy
Created August 28, 2019 15:52
Show Gist options
  • Save nanotroy/9b9d019ae40b80d77758c18133c463ff to your computer and use it in GitHub Desktop.
Save nanotroy/9b9d019ae40b80d77758c18133c463ff to your computer and use it in GitHub Desktop.
import Vue from 'vue'
import Router from 'vue-router'
import DefaultLayout from './layouts/Default.vue'
import Home from './views/Home.vue'
import Search from './views/Search.vue'
Vue.use(Router)
export default new Router({
mode: 'history',
routes: [
{
path: '/',
component: DefaultLayout,
children: [
{
path: '',
name: 'home',
component: Home
},
{
path: '/search',
name: 'search',
component: Search
}
]
}
]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment