Conditional logic
You can control logic within your template using a number of conditional statements including:
{{#if } {{else}} {{/if }}
- this checks for the existence of something (this does not check equality){{#unless}} {{else}} {{/unless}}
- this checks for the non-existence of something (this does not check non-equality){{#equal}} {{else}} {{/equal}}
- this checks equality, i.e. if something equals something
Example 1:
Example 2:
Follow a tutorial here to learn more about conditionals and equality
Last updated