Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to call vuejs function from external separate java script file. i have given code below which i am tried.

What I have tried:

//below is my vuejs code which i am trying calling show(). sep.js

Ut = {
data: function() {
},
methods: {
show() {
alert("Succes");
}
}
}

//below is my external js file external.js

function call(){
show()
}
Posted

1 solution

All you need to do is make sure both files are loaded by your page. And make sure the vue one is loaded first.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900