Created
May 14, 2018 14:52
-
-
Save thefln/c72bb754383108e898f49be8247f2141 to your computer and use it in GitHub Desktop.
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
import Vue from 'vue'; | |
import Router from 'vue-router'; | |
import ProductList from '@/components/ProductList'; | |
import ProductPage from '@/components/ProductPage'; | |
import NotFound from '@/components/NotFound'; | |
Vue.use(Router); | |
export default new Router({ | |
mode: 'history', | |
routes: [ | |
{ | |
path: '/', | |
name: 'Products', | |
component: ProductList, | |
}, | |
{ | |
path: '/products/:slug', | |
name: 'Product', | |
component: ProductPage, | |
props: true, | |
}, | |
{ | |
path: '*', | |
name: 'NotFound', | |
component: NotFound, | |
}, | |
], | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment