Conditional Rendering in handlebars

PHOTO EMBED

Thu Sep 22 2022 22:06:01 GMT+0000 (UTC)

Saved by @zaccamp #javascript #handlebars

{{#if value}}
<div>
	This content will only display if "value" is truthy
</div>
{{/if}}

---

{{#if loggedIn}}
        <button id="logout" class="btn-no-style">logout</button>
{{else}}
        <a href="/login">login</a>
{{/if}}
content_copyCOPY