0

So the issue can be seen in the picture bellow. I have added the functions to the prototype via

for (var i in memberFunctions) {
  classFun.prototype[i] = memberFunctions[i];
}

which gets executed before the function call. What confuses me most is why is the function visible in the Dev Tools but undefined when called?

How do I add these functions after the function is defined so that they can be called later?

The problem

ditoslav
  • 4,563
  • 10
  • 47
  • 79
  • 2
    `authService` is a constructor *function*, not an instance. It doesn't inherit those methods. – Bergi Jun 01 '16 at 18:44
  • I've closed your question as a duplicate of the canonical target that explains your misunderstanding, if there are any problems left please [edit] to include your actual code that reproduces the problem, including the `classFun` and `memberFunction` declarations, the instantiation, and the method invocation that fails. – Bergi Jun 01 '16 at 18:46

0 Answers0