Home > Back-end >  How to specify href as object in vuetify
How to specify href as object in vuetify

Time:07-18

I want to create a button that redirects to /forgot-password?rol=XXXX on vuetify. Currently I'm doing this manually but vuetify docs especify it can be done with an object. But I didn't find anything specifying what kind of object or requirements it must have.

How can I pass the arguments as an object? Is that object a URL?

<v-btn
    
    x-small
    plain
    v-t="'components.login.forgot_password'"
    :href="`/forgot-password?rol=${rol}`"
>
</v-btn>

CodePudding user response:

To add the path as an object, you need to specify the path and query properties.

In you, case will be something like that.

{ path: '/forgot-password', query: { rol: rol }}

For more resources.

https://router.vuejs.org/api/#to

  • Related