I used the special Handlebars helper to extend the functionality of the if block.
In Ember 1.10, this no longer works, since there is no Ember.Handlebars.bind property that allows binding to the property ....
Ember.Handlebars.registerHelper('ifCond', function (a, b, options) { return Ember.Handlebars.bind.call(options, contexts[0], a, options, true, function(result) { return result === b }); });
Usage will be:
{{#ifCond property "value"}} {{some-other-component}} {{else}} something other... {{/ifCond}}
but this returns the error "Unable to read property" call to "undefined"
Is there a way that I can bind to passed properties in helper? I cannot use registerBoundHelper because it does not support child blocks ... I wanted to use the Component instead of the helper, but then I can not use the {{else}} block ...
This assistant solution was previously taken from the Boolean operator in handlebars.js {{#if}} conditional
source share