In my app.js I have defined functions like this:
var func1 = function(v1,v2,v3) {
.
.
}
var func2 = function(v1,v2,v3) {
.
.
}
In my controller.js:
var action = "";
if(..) { action = 'func1';}
else {action = 'func2'}
action(a1,a2,a3);
However, I get an error, saying that action is not a function. How can I access func1 and func2`` like this?
action=func1 ... action=func2