You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@cz2246 In this case, the first parameter to inject is a function. All functions have a toString() method that essentially converts the function into its source code version as a string. You then have to parse using a regular expression to get all of the parameters that are passed into that function. Make sense?
The text was updated successfully, but these errors were encountered:
@cz2246 asked: How do we access arguments of the function passed as argument. For example in:
var injectedFunc = app.inject(function (Auth, User, MainCtrl, sum) {
return [Auth(), User(), MainCtrl(), sum(1, 2)].join(', ');
});
How can we access the names of the argumnets?
My response:
@cz2246 In this case, the first parameter to inject is a function. All functions have a toString() method that essentially converts the function into its source code version as a string. You then have to parse using a regular expression to get all of the parameters that are passed into that function. Make sense?
The text was updated successfully, but these errors were encountered: