3 ms·
Wait, are they seriously trying to say that "function(numberOfStates)" is dependency injection?
by JustSomeNobody 11y ago
Wait, are they seriously trying to say that "function(numberOfStates)" is dependency injection?
- mikeryan 11y agoIn 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.
- JustSomeNobody 11y agoI 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.