router-link with vue and vuetify confusion

TheBAST picture TheBAST · Dec 1, 2017 · Viewed 37.3k times · Source

How to use vue-router with using that predefined template:

https://vuetifyjs.com/examples/layouts/google-contacts

I have added a link in my items object

 items: 
[{ icon: 'dashboard' text: 'Home', link: '/'},

{ icon: 'dashboard' text: 'Account', link: '/account'},

I am confused where to put the router-link component.

Answer

Kael Watts-Deuchar picture Kael Watts-Deuchar · Dec 2, 2017

v-list-tile, v-btn, and v-card all extend router-link, so you can use any of the router-link attributes directly on those components instead.

In your case you can just use <v-list-tile :to="item.link">