/home , the URL will be replaced by
/ and then matched to
/.
routes configuration. The following example redirects from
/home to
/:
1 |
|
1 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
/ is aliased as
/home, which means that when the user accesses
/home, the URL is still
/home, but will be matched as the user is accessing
/.
1 |
|
arbitrary URL, and is not restricted by the configured nested structure. Make the alias start with / so that the path within the nested path becomes an absolute path. You can even combine the two, Use an array to provide multiple aliases:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
/people is an absolute path, that is, you can directly pass
/people to visit.
list is a relative path, that is, the url will be spliced with the parent's path → /users/list.
Note: If the route has parameters, be sure to include them in any absolute aliases:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
vue.js video tutorial】
The above is the detailed content of Examples of Vue Router route redirection and alias settings. For more information, please follow other related articles on the PHP Chinese website!