Closed robwilliams closed 6 years ago
Thank you for catching an error in the README example! I'll fix it today.
I don't mind accessing variables from the context by referring to it via the context, that way I know where that value is coming from. Setting it globally might go against the idea of LightService, where I wanted to decouple state from behavior.
In the README there is an example action:
This doesn't actually work,
order
has to be accessed through context, it's not available directly in the executed block.I've actually hit this issue myself and it would be nice to be able to reference the items in the context that have been defined with
expects
without the prefix..My workaround at the moment is to assign the variables myself:
Do you think this kind of sugar is worth adding?