Detailed explanation of vue-router single page routing

怪我咯
Release: 2017-07-04 15:04:03
Original
1840 people have browsed it

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

## Download address of vue-router on #github:

https://github.com/vuejs/vue-router

The simple code for routing jump is as follows:

        

Copy after login

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!

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