Reputation: 29
I am trying to call vuejs function from external javascript function,but its not calling, I have given below the code which i am trying.
//below is my vuejs code vu.js
Ut = {
data: function() {
},
methods: {
show() {
alert("Succes");
}
}
}
//below is my seperate js file ext.js
function call(){
show()
}
Upvotes: 0
Views: 63
Reputation: 170
You need to import your vue component to your ext.js
file
import Vu from '../vu'
function call(){
Vu.show()
}
Upvotes: 1