Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wait, are they seriously trying to say that "function(numberOfStates)" is dependency injection?


In angular that's basically how it works. The framework actually calls toString on the functions which actually allow you to parse out the arguments names so the callers know which arguments (dependencies) need to be passed.


I have to reply because I can't edit.

To the down voters:

Function(numberOfStates) is a function call with data being passed in.

Function(stateMachineFactory) is dependency injection.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: