How to specify href as object in vuetify

Viewed 21

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
    class="secondary--text"
    x-small
    plain
    v-t="'components.login.forgot_password'"
    :href="`/forgot-password?rol=${rol}`"
>
</v-btn>
1 Answers

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