The $call function provides a utility for calling functions using the davinci dependency injection framework.
Methods- method : function that is to be called.
- args : an object of named arguments. When the inputted method is called, the named parameters in the method are inspected and matched against values in args. If args is undefined, then all parameters are assigned undefined.
- obj : object that will be assigned to the 'this' reference.
var args = { name:'dan', age:12 };
var method = function(name, age){
//do something
}
var obj = {};
//calls the method with the given object as "this".
//args is optional
//obj is optional
$call(method, args, obj);