-
-
Save mtermoul/fe743d38f24eb05918bc45fdd4111d68 to your computer and use it in GitHub Desktop.
garage-sale/Router
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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