Y
Y
Yoshimoto2017-04-26 16:12:31
JavaScript
Yoshimoto, 2017-04-26 16:12:31

How to make transition to another component using button in vue-router?

I apologize in advance for the stupid question, but I just can’t understand how to make the transition from component to component using the button tag? The tutorials only write about links (router-link, a), but I need it with the help of a button.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Kulakov, 2017-04-26
@Yoshimoto

In order to <router-link>change to the desired tag during rendering, you need to specify it:

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

Y
Yeldos Adetbekov, 2017-04-26
@dosya97

https://coligo.io/dynamic-components-in-vuejs/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question