re: Dependency Injection in JavaScript 101 VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Great! And in this case: "$jsInject.register("engine", ["pistons", Engine]);", you have to pass the "pistons" in the array too because "Engine" rec...

You got it! The important part of the illustration is that "pistons" is just a label, not an implementation, so you have flexibility to define it however you see fit elsewhere.

Oh, I get it! Then I'll use this label on "$jsInject.get()". Amazing!! Thanks ;)

code of conduct - report abuse