title: How to redirect to a router with params in vue-routers
body: <p>I want to organize my vue router like this:  (xxx.com is my domain)</p>
  <p>xxx.com/                      -&gt; redirect to xxx.com/en/home</p>
  <p>xxx.com/:lang                 -&gt; redirect to xxx.com/:lang/home       (:lang is a param meaning language)</p>
  <p>xxx.com/:lang/home            -&gt; home page of :lang</p>
  <p>xxx.com/:lang/result/:date    -&gt; result page of a date</p>
  <p>xxx.com/:lang/result          -&gt; redirect to xxx.com/:lang/result/current_date  (current_date can be regarded as new Date())</p>
  <p>Below is my vue-router config</p>
  <pre><code>const router = new VueRouter({
      mode: 'history',
      routes: [{
          path: '/',
          redirect: '/en/home',
      },{
          path: '/:lang',
          name: 'lang',
          component: () =&gt; import(&quot;./Frame.vue&quot;),
          redirect: {name: 'home'},
          children: [{
              path: 'home',
              name: 'home',
              component: () =&gt; import(&quot;./components/Home.vue&quot;)
          },{
              path: 'result/:date',
              name: 'result',
              component: () =&gt; import(&quot;./components/ResultDay.vue&quot;)
          },{
              path: 'result',
              redirect: {name: 'result', params: {date: new Date()}},
          }]
      }]
  });
  </code></pre>
  <p>But it cannot redirect from xxx.com/en/result      to xxx.com/en/result/current_date. JS console  shows an error as &quot;[vue-router] missing param for named route &quot;result&quot;: Expected &quot;lang&quot; to be defined&quot;</p>
  <p>So how can I pass the param lang to the &quot;result&quot; router ?</p>