Open chriskrycho opened 4 years ago
Hey Chris,
The expectation is only invokable's i.e. Components and helpers are retrieved from scope. We can potentially add some docs clarifying this. The VM currently only lets us resolve invokable's and not necessarily any free variables in scope.
Chirag
Thanks for the quick reply! I think adding docs would help a bunch, and I can author a PR to that effect early next week if you like.
I also think we should look at making tweaks to the VM, though, because the behavior here is quite surprising—and I expect it will be particularly surprising for anyone coming from e.g. React.
Expected: any value in scope is accessible in templates.
Actual: functions in scope are accessible (as modifiers or helpers), but other values are not.
Here's a minimal reproduction playground.