Home > front end >  Function does not define how to solve
Function does not define how to solve

Time:01-26


This picture of the code, it is an independent js file, using the vue after introduction, has been an error. This startLoading is not a function
Advice on how to solve

CodePudding user response:

Maybe someone in vue jswebrtc used the js code, how to introduce into the vue

CodePudding user response:

Inside the function, so this point to the window object, so do not have this function,
Can place the call to bind the current instance,
 
Player. Bind (this)

CodePudding user response:

refer to the second floor and foliage quiet reply:
function, so this point to the window object, so do not have this function,
Can place the call to bind the current instance,
 
Player. Bind (this)

You mean like this? Is in my vue file bind? If this is the case that is not true

CodePudding user response:

Player function is to use the new call?

CodePudding user response:

reference 5 floor sky waves reply:
Player function is to use the new call?
no

CodePudding user response:

reference 5 floor sky waves reply:
Player function is to use the new call?

This is probably the js code framework, the somebody else's source code is not export default exported, but I find that if we do not add page there will be an error, so with this

CodePudding user response:

refer to 6th floor Norah_Yang response:
Quote: refer to fifth floor of the sky wave response:
Player function is to use the new call?
not


Player is a constructor must use new calls, or function of this points to the window object
  • Related