-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add root context lookup #18
Conversation
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. |
👏 |
@jonschlinkert thanks! I'll try to check it whether the case what. |
The cause was that It is all right only the following modifications when applicable the - 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 |
@doowb Is good. I wait for the new release of handlebars. |
Closing since we've updated to Handlebars 4 and we can use the |
Access to root context in partial by
{{root}}
.ex.
of
See handlebars-lang/handlebars.js#525 (comment)