Skip to content

Instantly share code, notes, and snippets.

@davidworkman9
Created October 10, 2014 18:50
Show Gist options
  • Save davidworkman9/d5e9d6fd25f89f6e1c32 to your computer and use it in GitHub Desktop.
Save davidworkman9/d5e9d6fd25f89f6e1c32 to your computer and use it in GitHub Desktop.
Blaze.registerHelper('ifEqualReturn', function (cond1, cond2, first, second) {
return cond1 === cond2 ? first : second;
});
<template name="test">
<li class="{{ifEqualReturn this._id selectedEl 'active' ''}}">test</li>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment