Ember's Registerboundhelper And Handlebar Blocks
So I have taken the 'is' helper block from here and modified it so that it register's it's helper through Ember using registerBoundHelper The reason I did that is because I basical
Solution 1:
You shouldn't ignore it because it isn't supported, if MyProperty
were to change after the render has occurred it will break.
Conditional helpers aren't supported (to many of our demise) in ember handlebars. The reason being is the core team wants this logic as a computed property instead of logic in the template.
IE
Controller
App.IndexController = Em.ObjectController.extend({
isPropertyOne: Em.computed.equal('myProperty', '1')
});
Template
{{#if isPropertyOne}}
any template stuff
{{render 'something'}}
{{someValue}}
{{/if}}
Post a Comment for "Ember's Registerboundhelper And Handlebar Blocks"