diff --git a/src/router/index.js b/src/router/index.js index c4e21567..d849ab79 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -35,22 +35,21 @@ export default new Router({ path: '/settings', component: RwvSettings }, + // Handle child routes with a default, by giving the name to the + // child. + // SO: https://github.com/vuejs/vue-router/issues/777 { - name: 'profile', path: '/@:username', component: RwvProfile, - redirect: { - name: 'profile-articles' - }, children: [ { - name: 'profile-articles', - path: 'articles', + path: '', + name: 'profile', component: RwvProfileArticles }, { - name: 'profile-favorited', - path: 'favorited', + name: 'profile.favorites', + path: 'favorites', component: RwvProfileFavorited } ] diff --git a/src/views/Profile.vue b/src/views/Profile.vue index 9eb3e58d..efeefb8d 100755 --- a/src/views/Profile.vue +++ b/src/views/Profile.vue @@ -40,12 +40,20 @@