This article mainly introduces the detailed explanation of Vue.jsBuildingroutingError reporting router.map is not a function, very useful For practical value, friends in need can refer to
Error:
Cause of the problem : There is no map method in 2.0, only 1.0 is compatible with this method.
Solution:
(1) Method 1: Use the command npm install vue-router@0.7.13 is compatible with vue version 1.0.
How to use it in the code:
(2) Solution 2: Based on vue2.0, write the corresponding method.
The specific usage is as follows:
Note: There are big differences between 1.0 and 2.0 in some usages, so you need to pay attention when using them.
The above is the entire content of this article. I hope it will be helpful to everyone's study. I also hope that everyone will support Script House.
The above is the detailed content of Detailed explanation of Vue.js routing error reporting router.map is not a function_vue.js. For more information, please follow other related articles on the PHP Chinese website!