Skip to content

Instantly share code, notes, and snippets.

@mtermoul
Last active September 15, 2018 21:39
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 mtermoul/fe743d38f24eb05918bc45fdd4111d68 to your computer and use it in GitHub Desktop.
Save mtermoul/fe743d38f24eb05918bc45fdd4111d68 to your computer and use it in GitHub Desktop.
garage-sale/Router
// garage-sale/src/router/index.js
import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/Home.vue'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'home',
component: Home
},
{
path: '/post/:postIndex?',
name: 'post',
component: () => import('@/components/PostDetails.vue'),
props: true
}
],
mode: 'history'
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment