Detailed explanation of Vue.js routing error reporting router.map is not a function_vue.js

陈政宽~
Release: 2017-06-28 15:35:44
Original
1642 people have browsed it

This article mainly introduces the detailed explanation of Vue.jsBuildingroutingError reporting router.mapis 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 installvue-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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!