[Vuejs]-Vuejs route based on payload

0👍

You have to define your router with parameters

{
  path: '/foobar',
  name: 'foobar',
  component: foobar,
}
{
  path: '/foobar/:status',
  name: 'foobarSuccess',
  component: foobarSuccess,
  query: { status: 'success' }
} 

here status will contain like success, finally /foobar/success
based on this parameter also you can display the sccuess message

For more information you can refer the simple docs https://router.vuejs.org/en/essentials/dynamic-matching.html ,

Leave a comment