2012-06-01 8 views

Respuesta

6

unos días un push on the master resuelven el problema: uso Ember.Handlebars.registerBoundHelper.

Ember.Handlebars.registerBoundHelper('myHelper', 
    function(myBinding, options) { 
     return myDealWith(myBinding); 
    } 
); 
+0

No se puede hacer con objetos de bloque. – iConnor

4

Tienes que usar Ember.getPath para obtener el valor en el método de ayuda.
Consulte la documentación hace http://emberjs.com/documentation/#toc_writing-custom-helpers

+0

¿Hay alguna razón por la que debería usar 'Ember.getPath (this, property)' over 'this.getPath (property)'? – hekevintran

+2

Te gustaría utilizar 'Ember.getPath' si alguna vez esperas que' this' no sea un 'Ember.Object'. – ebryn

+0

... lo que quiere decir que la mayoría de las veces puede (y debería) utilizar 'this.getPath'. –

Cuestiones relacionadas