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 params to #embed #14
Comments
The context is passed into |
In the meantime, this workaround should provide the functionality you're looking for in your example case. {{!-- component --}}
<div>
<h2>I'm visible</h2>
{{#block "title"}}<h2>Hide me!!! if you can...</h2>{{/block}}
{{#block "content"}}{{/block}}
</div> {{!-- usecase --}}
{{#embed "component"}}
{{#content "title"}}{{/content}}
{{#content "content"}}<h4>This is the new way</h4>{{/content}}
{{/embed}} In the usecase, defining an empty block will replace the {{!-- usecase --}}
{{#embed "component"}}
{{#if ../someValue }}
{{#content "title"}}{{/content}}
{{/if}}
{{#content "content"}}<h4>This is the new way</h4>{{/content}}
{{/embed}} |
Feature added and released as 1.1.0. |
Hi, is there a way to add params or data to the embeds, just like this???
Component
Implementation
Result
Or maybe you can pass the context??? I don't know much about Handlebars so, if this functionality already exist, can you give a example??? Thanks a lot.
The text was updated successfully, but these errors were encountered: