title: Recursive slugs in vue-router routes
body: <p>I'm setting up a website which will contain groups, these groups can have sub-groups and these sub-groups can have sub-groups and so on...</p>
  
  <p>Is this in any way possible?</p>
  
  <p>Ofcourse making the path of a route like: <code>/groups/:slug/:slug</code> does not work since it contains duplicate params.</p>
  
  <p>What I was thinking of was using the star pattern as child route, this child route will redirect the user back to the parent route with the slug and a sub-slug, then the next action will be to act on the sub-slug if it exists. But maybe someone has a better solution to this?</p>
  
  <pre class="lang-js prettyprint-override"><code>const groupRoute = {
      path: `/groups/:slug`,
      name: 'group',
      component: Group,
      children: [
          {
              path: '',
              component: GroupsHome
          },
          {
              path: '/subgroups',
              component: SubGroups
          },
          {
              path: '*',
              beforeEnter(to, from, next) {
                  next({
                      name: 'group',
                      params: {
                          slug: to.params.slug,
                          subSlug: to.params.pathMatch
                      }
                  })
              }
          },
      ]
  }
  </code></pre>