Closed shootaroo closed 7 years ago
This looks nice. I'll take a look at it and run it through some assemble tests tomorrow.
Thank you.
@shootaroo sorry, I lost track of this PR since it's in a repo that we don't have a lot of activity on. I'm testing it today to see how it works out. Thanks again for the PR.
:clap:
@jonschlinkert thanks!
I tried the {{@root}}
, but there was a case that does not work.
I'll try to check it whether the case what.
The cause was that options.data
is not over the handlebars.compile
.
It is all right only the following modifications when applicable the {{@root}}
.
- tmpl = handlebars.compile(tmpl, options);
+ tmpl = handlebars.compile(tmpl, _.defaults({data: true}, options));
Okay, I see now. I think we can make that change, but we want to leave out the custom name lookup and use the latest handlebars that has @root
.
@doowb Is good. I wait for the new release of handlebars.
Closing since we've updated to Handlebars 4 and we can use the {{@root}}
property.
Access to root context in partial by
{{root}}
.ex.
of
See https://github.com/wycats/handlebars.js/pull/525#issuecomment-25759857