Skip to content

Instantly share code, notes, and snippets.

@thefln
Created May 14, 2018 14:52
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 thefln/c72bb754383108e898f49be8247f2141 to your computer and use it in GitHub Desktop.
Save thefln/c72bb754383108e898f49be8247f2141 to your computer and use it in GitHub Desktop.
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