Helper broken in Ember 1.10

流过昼夜 提交于 2019-12-01 09:29:06

I actually managed to find a way to do it, so I'll write the answer for my own question...

Instead of using undocumented hacks, I used the proposed change: https://github.com/emberjs/ember.js/issues/10295

So my helper looks like this now:

Ember.Handlebars.registerBoundHelper('isSame', function(value1, value2) {
    return value1 === value2
});

and the usage:

{{#if (isSame property "value")}}
    {{some-other-component}}
{{else if (isSame property "otherValue"}}
    something other...
{{else}}
    something other...
{{/if}}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!