Wednesday, December 5, 2018

vue component - How to use Vue.js in an external js file

Why is it that I can't get a basic hello world to print using Vue when I put it in an external js file, yet when I put it in the html file surrounded by a script tag, it works fine



When I copy and paste the contents of the that script tag inside a file called js_vue.js it doesn't work at all



I'm new to learning Vue so I don't tell get what's going on here. Surely there's a way to put all my js code in a separate file like I would with raw html and jquery








Title








{{ message }}











As a Snippet:





var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue!'
}
})





{{ message }}


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...