这是我的代码
{{#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;
});
预期结果:- 它应该返回真/假