When I try to pass an Ember binding or computed property to a custom Handlebars helper, the helper receives the string instead of the value. How do I get the value into the helper?
The template:
{{my_helper my.binding}}
The helper receives "my.binding" instead of the corresponding value.
A few days ago a push on the master solved the problem : use Ember.Handlebars.registerBoundHelper.
Ember.Handlebars.registerBoundHelper('myHelper',
function(myBinding, options) {
return myDealWith(myBinding);
}
);
You have to use Ember.getPath to get the value in helper method.
See the docs http://emberjs.com/documentation/#toc_writing-custom-helpers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With