Handlebars.Net
Handlebars.Net copied to clipboard
Conditional block does not work within a partial
Describe the bug
I have the following partial registered
var partialSource = "{{#if ClientCode}}IT EXISTS{{else}}IT IS NOT HERE{{/if}}";
Handlebars.RegisterTemplate("LinkToCompany", partialSource);
And I pass in my entity
{
ClientCode = "TEST"
}
with this template
{{> LinkToCompany Entity}}
Expected behavior:
I expect that to render as IT EXISTS, since the entity contains a ClientCode property.
Hello @sebasijan Can you please provide a test that covers your problem?