How get route's params with Nuxt3

95 Views Asked by At

I used Nuxt3 with Composition API. When moving from bakset to order, basket is using router.push, and is turning over parameters. How can I get these parameters from order? In the nuxt2 version, you can easily get them using context.params, but I don't know how to get them in the nuxt3 version.

bakset.vue
navigateTo({
    name: 'or-order-Order',
    path: '/or/order/Order',
    params: {
      ordMediaCd: '01'
    }
  });


Order.vue
how to get params 'ordMediaCd'
1

There are 1 best solutions below

0
its_shakh On

You can use useRoute().params to get the route params. See docs for more about useRoute().