I am wondering if registerBoundHelper in ember should ever be able to handle block style helpers. For example, I created the following:
Ember.Handlebars.registerBoundHelper('unlessUndefined', (context, options) -> unless typeof context == "undefined" return options.fn(this) else return options.inverse(this) )
The idea is to use it as such:
{{#unlessUndefined choice}} {{#if choice}} <p>You chose yes</p> {{else}} <p>You chose no</p> {{/if}} {{else}} <p>Make a choice</p> {{/unlessUndefined}}
The options.fn (this) elements do not display any output. In doing so, I get an error in the console that says: "You cannot use appendChild outside the rendering process"
If this is not possible, maybe someone can suggest another way to get a conditional block that will only show if the border value is not undefined?
David monagle
source share