0

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()
           }
1
  • Can you create this problem at any code snippet? Commented Feb 9, 2021 at 7:44

1 Answer 1

1

You need to import your vue component to your ext.js file

import Vu from '../vu'

function call(){
 Vu.show()
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.