路线无效(Vue.js)

时间:2018-10-04 19:03:23

标签: vue.js vue-router

我的System.ServiceProcess组件的路由有效(see here),而我的Login.vue组件的路由无效(see here)。为什么?

Full source code here

路由器配置文件(src / router / index.js):

SignUp.vue

HTML根文件(index.html):

import Vue from 'vue';
import Home from '../components/Home.vue';
import SignUp from '../components/SignUp.vue';
import Login from '../components/Login.vue';

import Router from 'vue-router';
Vue.use(Router);

export default new Router({
  routes: [
  {
    path: '/',
    component: Home
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: 'signup',
    component: SignUp
  },
  ]
});

1 个答案:

答案 0 :(得分:0)

path: 'signup',更改为path: '/signup',