twitter / hogan.js

A compiler for the Mustache templating language
http://twitter.github.io/hogan.js
Apache License 2.0
5.14k stars 431 forks source link

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

Closed torgeir closed 10 years ago

torgeir commented 10 years ago

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 commented 10 years ago

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