[Vuejs]-Vue 2: configure router to navigate to other product using relative path

0๐Ÿ‘

You can use <router-link to="/product_B_Id/version_1_Id">Product_B/Version_1</router-link>

0๐Ÿ‘

I have achieved it by adding children path in vue router and redirecting it to page productId/versionId:

{
    path: 'products/details/:productid',
    name: 'productsdetails',
    component: ProductDetails,
    },
    children: [
      {
        path: ':productid/:versionid',
        redirect: {
          name: 'releaseDetails',
        },
      }
    ]
  },

Leave a comment