This article mainly introduces the relevant information of vue-router single pageroutingin detail. It has certain reference value. Interested friends can refer to it
vue Among them, there is aclass librarycalled vue-router, which is used for single-page routing. Routing is generally divided into four steps:
Prepare a root component vue.extend();
Prepare template for the content that needs to be routed ;
Prepare routing new VueRouter();
Associated routing map
Start routing start (App,'#box'); //The first parameter is the prepared root component, and the second parameter is the location to be bundled in the id defined by yourself
https://github.com/vuejs/vue-router
The simple code for routing jump is as follows:The above is the detailed content of Detailed explanation of vue-router single page routing. For more information, please follow other related articles on the PHP Chinese website!