Я использую Laravel 5.3 с Vue 2 и Vue Router, но мой компонент не виден. Foo и Bar работают.Laravel 5.3 vue 2 компонент не отображается
Вот мой App.js
/**
* Load JavaScript dependencies
*/
require('./bootstrap');
/**
* Import Vue and VueRouter
*/
import Vue from 'vue'
import VueRouter from 'vue-router'
/**
* Import Components
*/
import UsersIndex from './components/users/Index.vue'
import Example from './components/Example.vue'
/**
* Use VueRouter
*/
Vue.use(VueRouter)
/**
* Define components
*/
const Foo = { template: '<div>Foo</div>' }
const Bar = { template: '<div>Bar</div>' }
/**
* Create Router
*/
const router = new VueRouter({
mode: 'history',
routes: [
{ path: '/foo', component: Foo },
{ path: '/bar', component: Bar },
{
path: '/users',
components: {
component: UsersIndex
}
}
]
})
/**
* Create Vue instance and inject router
*/
new Vue({
router
}).$mount('#app')
Я не получаю сообщение об ошибке в vuejs Дев инструментов. Но мой компонент UserIndex не отображается.
Любая идея?
Update
Если я пытаюсь
{
path: '/users',
component: UsersIndex
}
я получаю следующее предупреждение Вью
[предупредить Вю]: Не удалось установить компонент: шаблон или визуализации функции не определены.