Closed incompl closed 10 years ago
I'm not sure about this one. this
could be a property on a context object in which case, should that be used or should the whole object be used? I think the same goes for any name we could think of. I was thinking of only iterating the context object if you omitted all arguments to each
. Doesn't feel quite right though.
Good point, you led me to notice that "this" is an invalid object key in handlebars. I wonder if there is a way to do this with a syntax that doesn't fight the context namespace.
I actually like the "each" by itself idea
Closed via a121a5535ff5a9b098aaeb8417c53acde67deed5
var template = '{%each this%} {{name}} {%endeach%}'; var context = [{name:"Fred"}]; combyne(template, context).render();
would output "Fred"