Three Vue-Router methods for jumping between components

小云云
Release: 2018-05-14 16:44:16
Original
3469 people have browsed it

This article mainly introduces the three methods of Vue-Router to implement jumps between components. It has certain reference value. Interested friends can refer to it. I hope it can help everyone.

Provides 3 ways to jump:

① Directly modify the routing address in the address bar

        

{{msg}}

Copy after login

② Jump through router-link

注册
Copy after login
         
         
         

{{msg}}

Copy after login

③Through js programming


jumpToLogin: function () { this.$router.push('/myLogin'); }
Copy after login

Code


         
         
         

{{msg}}

Copy after login

Related recommendations:

Detailed explanation of vue-router routing and navigation between pages

Detailed explanation of the solution to the problem of vue-router routing parameter refresh and disappearance

Vue-Router implementation page is loading special effect method examples

The above is the detailed content of Three Vue-Router methods for jumping between components. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn