jeudi 22 mars 2018

Failed to execute 'createElement' on 'Document' The tag name provided ('') is not a valid name

I use this library https://github.com/laravue/laravue, but when I run it to my local it displays error:

Uncaught DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name.

here's my app.blade.php:

<div class="container" id="app">
        <div class="content">
            <component is="@" v-bind:app="laravue.app" keep-alive></component>
        </div>
    </div>
    <script defer="defer" src="/js/bundle.js"></script>

my App.js

var Vue = require('vue')
// Vue.use(require('vue-resource'))
// Vue.use(require('vue-validator'))
// Vue.use(requrie('vue-router'))
Vue.config.debug = true // Comment this line for production

new Vue({
    el: '#app',
    created: function() {
        this.laravue.init.call(this, ['home']);
    },
    data: {
        laravue: require('./laravue.coffee')
    },
    components: require('./components.coffee') // You can just inline them, but I recommend putting them in their own file
})

components.coffee:

module.exports =
    # Custom Elements
    'titles': require './components/title.coffee'
    'random-quote': require './components/random-quote.coffee'

    # Views
    'home-view': require './views/home.coffee'

home.coffee:

module.exports =
    ready: () -> require('../view-ready.coffee').call(this)
    props: ['app']
    template: require('./home.template.html')

and here's my home.template.html:

<title>Laravue </title>
<random-quote></random-quote>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire