Hi binaryMoods,

Your diagram contained number 3. I should have explained how this array 
works.
the array takes the names(strings!) of the things you want to inject. The 
last element is the actual function. The function will receive the the 
things in the order you defined in the array. the names in the function's 
parameters are local to the function.

['thing1', 'someService', '$http', function someFunction(thing,service,http) 
{...}] 

Notice that I didn't use the exact same names. The order is what matters. 
It is really a bad idea to change the names, but in here I just wanted to 
make a point. The above will translate into:

function someFunction(thing,service,http) {...}]
someFunction.$inject=['thing1', 'someService', '$http'];

Does that explain it enough for you?

Regards
Sander


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to