0👍
It is something like that :
document.addEventListener('load', function() {
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue!'
},
methods: {
loadJs(url, callback) {
jQuery.ajax({
url: url,
dataType: 'script',
success: callback,
async: true
});
}
},
mounted() {
this.loadJs('myvuefile.js',
function() {
//Stuff to do after someScript has loaded
});
- [Vuejs]-Dynamic menu or list in VueJS
- [Vuejs]-How to get buttons fixed irrespective of the contents hidden or not in a card in Vuetify?
Source:stackexchange.com