In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "what is the difference between vue router redirection and alias". In daily operation, I believe that many people have doubts about the difference between vue router redirection and aliases. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the questions of "what is the difference between vue router redirection and aliases?" Next, please follow the editor to study!
Difference: redirect refers to jump to another page, its function is to prevent users from typing file names, when the user enters a system-independent path will jump to the specified page. Alias refers to adding a new path to the route so that no matter which path is applied, the page content of the same route will eventually be displayed; aliases can be used to hide the real path.
The operating environment of this tutorial: windows7 system, vue2.9.6 version, DELL G3 computer.
Differences between vue router redirects and aliases
Redirect official description:
When the user accesses / a, the URL will be replaced with / b, and then the matching route will be / b
Role: personal understanding, the role of vue router redirection is to prevent users from typing file names, when the user enters a path that has nothing to do with the system will jump to the specified page.
Description of the alias:
The alias of / an is / b, which means that when the user accesses / b, the URL remains at / b, but the route match is / a, just as the user accesses / a.
In fact, it is to add a "nickname" to a route-a new path, so that no matter which path is applied, the page content of the same route will eventually be displayed.
The effects of this extension are as follows:
1. Hide the path
2. When writing code, you can replace the actual path with an alias. At that time, if the jump page in the project needs to be changed, you only need to change the routing configuration, which can be regarded as a variable of the path.
At this point, the study on "what is the difference between vue router redirection and aliases" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.