javascript - Checking argument names inside a function -
Is there a way in javascript to check any logic identifier name inside the function ??? For example:
var config = function (callback) {if (callback.definedArgumentName == 'argumentName') // something to do}; Config (function (argumentName) {// do something}};
I'm asking if there is something that can be called -backback. DefinedAmergetameName - can be transformed into this example.
So I posted this question because I wonder how in AngularJ they used to be an administrator Orders and controllers recognize the names of the controllers specified in the definition.
The reply of Temu can be correct, I I have given advice and obviously you do not need any functionality. I have made an example:
var services = {'$ scope': 'This is scope service', 'MyService ':' This is your own service. '}; Function controller (callback) {var args = callback. Strothing (.) Partition (' ('); Argus Plus (0,1); Args = args. Join Args = args.join (); ArgNames = args.split (','); Callback (services [argon name [0]); Split (')'); args.splice (1, args.length -1) ], Services [argon name [1])} controller (function ($ radius, myS Ervice) {console.log (services. $ Scope, services MySwive)});
Comments
Post a Comment