javascript - Router-link problem in vue-router
阿神
阿神 2017-06-12 09:32:23
0
1
875

Main.vue:

<router-link :to="{name:'Home'}">首页</router-link>

routing:

The error is reported as follows:

Why does using :to="{name:'Home'}" report an error, but the ordinary to="/home" has no problem?

阿神
阿神

闭关修行中......

reply all(1)
phpcn_u1582

This is embarrassing. Vue should directly parse the data in to as a string, so if the method you wrote cannot parse it, an error will be reported.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template