Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom lambdas/sections cannot access nested parent's context #194

Closed
torgeir opened this issue Jun 19, 2014 · 1 comment
Closed

Custom lambdas/sections cannot access nested parent's context #194

torgeir opened this issue Jun 19, 2014 · 1 comment

Comments

@torgeir
Copy link
Contributor

torgeir commented Jun 19, 2014

When writing custom lambdas/sections, the function can only reach the current sections' context as this. It would be useful to be able reach nested contexts also when writing these types of functions yourself

https://gist.github.com/torgeir/9109d2eaccd9bd450cc8

Hogan already seems to do this internally

https://gist.github.com/torgeir/e93699bc10d015b6902f

torgeir added a commit to torgeir/hogan.js that referenced this issue Jun 19, 2014
Allow sections extensions with outer sections to access the properties
of outer contexts. This allows for section extensions to behave like
hogan.js does internally when looking up properties directly in
templates.
@torgeir
Copy link
Contributor Author

torgeir commented Jun 19, 2014

This would allow something like https://gist.github.com/torgeir/7064a68fd253755f64a3

sayrer added a commit that referenced this issue Jun 24, 2014
@sayrer sayrer closed this as completed Jun 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants