Enclosing a router-link tag in a button in vuejs

Kushagra Agarwal picture Kushagra Agarwal · Aug 11, 2017 · Viewed 83.1k times · Source

Can I wrap or enclose a router-link tag in a button tag?

When I press the button, I want it to route me to the desired page.

Answer

choasia picture choasia · Aug 11, 2017

You can use tag prop.

<router-link to="/foo" tag="button">foo</router-link>