mardi 27 octobre 2015

Use Handlebars in EmberJS

I am trying to use a custom helper in my Ember project. So I have done bower install --save handlebars

and then under helpers\compare.js, I have

import Handlebars from 'handlebars';

Handlebars.registerHelper('compare', function (lvalue, rvalue, options) {
}

Is this the correct way to import Handlebars js and use it inside helper ?




Aucun commentaire:

Enregistrer un commentaire