Laravel Vue component not working

Viewed 2054

I am using Laravel 5.4 and trying to implement vue.js. I have created a component like this :

    <template>
     <li>This is a list item</li>
   </template>

<script>
    export default {
        ready() {
            console.log('Component ready.')
        }
    }
</script>

and saved it as Chat.vue in components folder.

Then in app.js:

Vue.component('chat', require('./components/Chat.vue'));

const app = new Vue({
    el: '#app'
});

Trying to use it in view:

<div id="app">

<chat></chat>

</div>

But I don't get the expected view.I should get a <li> but nothing.BLANK!!! Don't get any message in console.I have searched through internet for last three hours to get a solution.I have cleared my cache and disabled cache in chrome. Nothing happened.I also tried in firefox but no luck.

Another problem is I have deleted Example.vue from the components folder.But when I am using <example> in my view, it's still working.

0 Answers
Related