import Vue from 'vue' import Router from 'vue-router' import Home from './views/Home.vue' import Profile from './views/Profile.vue' Vue.use(Router) export default new Router({ mode: 'history', routes: [ { path: '/', name: 'home', component: Home }, { path: '/u/:name', name: 'profile', component: Profile, props: true } ] })