This time I will bring you vue.js routing failure and cannot be used. What are the precautions to solve the problem of vue.js routing failure and failure. The following is a practical case, let's take a look.
I have newly learned the routing in vue.js and added a simple routing example (from vue-router 2) to the vue demo I wrote before, but after adding the click only The address bar changes, but the content does not change. And some effects written before with jquery also fail. Finally, the reason was found because the same ID was launched twice (the first time was launched when using the vue component before, and the other one was Started during routing)
Attached is part of the code
I believe you have mastered the method after reading the case in this article. Please pay attention for more exciting things. Other related articles on php Chinese website!
Recommended reading:
Detailed explanation of the use of JS prototype and prototype chain
Detailed explanation of the use of Angular CLI to generate Angular 5 projects
The above is the detailed content of vue.js routing is invalid and cannot be used. For more information, please follow other related articles on the PHP Chinese website!