[Vuejs]-Vue โ€“ passing params to route as props is undefined

3๐Ÿ‘

โœ…

You have to use the boolean mode for to pass the params to both the URL and props. You also have to define the parameter inside the path to be able to access it. Here is an example that shows how to use it.

{
  name: "team",
  path: "/team/:id",
  component: TeamInfo,
  props: true,
}

https://router.vuejs.org/guide/essentials/passing-props.html#boolean-mode

๐Ÿ‘คSamuel Vaillant

Leave a comment