0

Possible Duplicate:
Logical operator in a handlebars.js {{#if}} conditional

Here is my code

{{#each dataArray}}
     <li>{{#isTrue idVal1 idVal2}}
    show some text1
 {{else}}
    show some text2
 {{/isTrue}}
    </li>
{{/each}}

Em.Handlebars.registerHelper('isTrue', function(x, y) {
    console.log(x);// shows idVal1
    console.log(y);// shows idVal2 not the exact value, I have passed
    return x==y;
 });

Expected Result:- it should return true/false

Community
  • 1
  • 1
Bob
  • 451
  • 1
  • 5
  • 16

1 Answers1

0

It's impossible to write bound helpers, issue #1274.

I am wondering why this useful pull request still pending. There is a workaround.

Sammy
  • 229
  • 2
  • 8