Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass props to the route? #335

Open
3 tasks done
ghost opened this issue Nov 18, 2022 · 2 comments
Open
3 tasks done

Pass props to the route? #335

ghost opened this issue Nov 18, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 18, 2022

Description

Is there a way to pass props through router to the second page? Not params, not queries, but props?

https://router.vuejs.org/guide/essentials/passing-props.html#passing-props-to-route-components

Suggested solution

/

Alternative

No response

Additional context

No response

Validations

  • Follow the Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@blowsie
Copy link

blowsie commented Nov 21, 2022

I tried to implement a workaround but ran into a bug with extendRoute
#338

@abdul-alhasany
Copy link

I wonder why you want to pass props and not params or anything else?

Either way, it seems that vue passes paramters as props but not documented very well. In the same link you sent you can see under Boolean mode that:

When props is set to true, the route.params will be set as the component props.

Which means you set props: true in the routes definition and then the params you pass to the route will be treated as props.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants