Introduction to the

Because we use Vue to develop a page is a single page application, equivalent to only one main index.html, at this time we can not use a tag to switch pages, so at this time we today’s protagonist Vue-Router on the shining debut vue-Router is our page link path management system

Getting started initialization

SRC > Router >index.js SRC > Router >index.js SRC > Router >index.js SRC > Router >index.js SRC > Router >index.js

<router-link to="/Fond"</router-link> </router-linkCopy the code

Zi lu by

The case of child routing is generally used when a page has its base template, and then the pages below it are all part of that template, only partially styled in the index.js component

http://localhost:8080



fond
fond
http://localhost:8080/Fond
fond



fond/load
fond
load


Routing parameters

role

Receives parameters from the previous page

In field

Passing the to parameter through the

tag first we need to add in the Fond component

name:
params:{}
Load
$route.params. Parameter name

The effect

Let’s look at it in the browser

Go to my little brother's



Go find the third grade

Single page multiple routes