Re:Introducing the Famous Framework
by JustSomeNobody on Wednesday June 24, 2015 @11:38AM
(#9772340)
Wait, are they seriously trying to say that "function(numberOfStates)" is dependency injection?
[ Parent
| on HN ]
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.
Re:Introducing the Famous Framework
by JustSomeNobody on Wednesday June 24, 2015 @05:48PM
(#9774719)
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.