Is #if working at all?
See original GitHub issueHi,
Just wanted to know if #if is implemented at all?
{{#if 1}}
<h1>TEST TRUE</h1>
{{/if}}
{{#if 0}}
<h1>TEST FALSE</h1>
{{/if}}
If not, could anyone point me in the direction of where it should be implemented?
I tried to implement it by writing my own helper, but then I’m missing a way to call the renderer again. Example:
Handlebars.RegisterHelper("section", (writer, context, parameters) =>
{
var section = context as ReportSection;
if (section == null) return;
switch (section.Type)
{
case ReportSectionType.Frontcover:
writer.WriteSafeString(????); //How do I make the writer "continue" to render the inner template?
break;
}
});
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Opinion | Jobs for All! But Is It Working for All?
Here, we ask whether we work to live or live to work. Can we achieve true democracy without considering economic democracy? Can economic...
Read more >How some people get away with doing nothing at work - Vox
Vox granted him anonymity to speak for this story for obvious reasons, as we did all of the workers interviewed.
Read more >Extreme Jobs: The Dangerous Allure of the 70-Hour ...
Across the economy, there are high-earning professionals whose work has become all consuming. The outrageous hours they put into their careers are matched...
Read more >35% of workers who can work from home now do this all ...
About a third of workers with jobs that can be done remotely are working from home all the time, according to a new...
Read more >I've been working from home for 10 years. Here are the 6 ...
Don't make these 6 biggest mistakes if you're working from home, says guy who's done it for 10 years · 1. Working in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If it helps someone in the future,
#if
does not work well with dynamic objects. Instead try usingExpandoObjectConverter
andExpandoObject
.Closing this due to inactivity.