Linked Questions

Popular Questions

Vue actualizing variable

Asked by At

I'm using vue.js and I have an app with

var vm = new Vue({
    el: '#app',
    data: function() {
       return {
          elements: json_data,
       }
    }
})

I also have a js file that I import in my html:

<script src="javascriptFile.js" defer></script>

The json_data is a global variable inside the javascriptFile.js. When I modify the file, my vue app doesn't reload the component I'm using with the new data. How can I do that?

Related Questions