Я встраиваю маршруты в свой веб-сайт, используя vue-router
, я пытаюсь настроить свой файл маршрутов так же, как coreui делает это .В настоящее время я получаю сообщение об ошибке "[vue-router] route config component" for path: / cannot be a string id. Use an actual component instead
.
. / Src / router / index.js
import Vue from 'vue';
import Router from 'vue-router';
// Containers
const DefaultContainer = '../containers/DefaultContainer';
// Componenets
// const Navbar = '../components/Navbar';
// Views
const Home = '../views/Home';
const PageNotFound = '../views/404';
// Routes
Vue.use(Router)
export default new Router ({
mode: 'hash',
routes: [
{
path: '/',
redirect: '/home',
name: 'Home | Portfolio | Tom Dickson',
component: DefaultContainer,
children: [
{
path: 'home',
name: 'Home | Portfolio | Tom Dickson',
component: Home
}
]
},
{
path: '*',
component: PageNotFound
}
]
})