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?
I tried using makeBoundHelper from HTMLBars and Ember.Helper.helper both of which kept failing with ember 1.13 with the same error as you’ve mentioned. I was using ember-cli-auto-register-helpers earlier, removing that fixed the issue.
// app/helpers/test-helper.js
import Ember from 'ember';
export default Ember.Handlebars.makeBoundHelper(function() {
return "Works!";
});
Side note, if you’re on 1.13.x you should check out the new Ember.Helper
API Ember.js 1.13.0 and 2.0 Beta Released