jeudi 7 mai 2015

fn.apply is not a function - trying to create a Handlebars helper

I create the file app/helpers/test-helper.js:

import Ember from 'ember';

export default Ember.Handlebars.registerBoundHelper('test-helper', function() {
  return "Works!";
});

And in the template:

{{test-helper}}

And I get the above error in the console. What am I doing wrong here?

Aucun commentaire:

Enregistrer un commentaire