[Vuejs]-I want to use Vue local, but it doesnt work

0👍

Put your Vue scripts at the end of the body and as @Terry suggested change the path of your vue.js script to ‘/js/vue.js’:

here’s a working example https://codepen.io/ellisdod/pen/PoqBRbg?editors=1010

<body>
    <div id="index">
        <p>{{ message }}</p>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>

        new Vue({
            el: '#index',
            data:{
                message:'Hello Vue!'
            }
        })
    </script>
</body>

Leave a comment