Created
March 8, 2016 14:07
-
-
Save TheDutchCoder/82ba409d16fa7c2e6e30 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 VueRouter from 'vue-router' | |
import VueResource from 'vue-resource' | |
import App from './App' | |
import view from './components/view' | |
Vue.config.debug = true | |
Vue.use(VueRouter) | |
Vue.use(VueResource) | |
var router = new VueRouter({ | |
hashbang: false, | |
history: true | |
}) | |
router.map({ | |
'/': { | |
component: view | |
}, | |
'/products/:slug': { | |
name: 'menu', | |
component: view | |
}, | |
'*': { | |
component: { | |
template: '<h1>404</h1>' | |
} | |
} | |
}) | |
router.start(App, '#app') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment