mardi 27 janvier 2015

BoundHelper for Handlebars blocks

I updated Handlebars to 2.0.0 version and got deprecation:



Usage of Ember.Handlebars.get is deprecated, use a Component or Ember.Handlebars.makeBoundHelper instead.


After rewrite code using BoundHelper:



registerBoundHelper-generated helpers do not support use with Handlebars blocks.


How to to write handlebars blocks helpers without this deprecations.


helpers look like this:



export default function(lvalue, rvalue, options) {
lvalue = Ember.Handlebars.get(this,lvalue, options);
rvalue = Ember.Handlebars.get(this,rvalue, options);
//logic with lvalue and rvalue
}




Aucun commentaire:

Enregistrer un commentaire