« All deprecation guides
Deprecation Guide for Handlebars / HTMLBars helpers
All the various ways to create helpers on the Handlebars and HTMLBars namespace
have been deprecated in favor of the
Ember.Helper class and it's
Ember.Helper.helper
function. The makeViewHelper
method has been deprecated in favor of just using
an Ember.Component
.
makeViewHelper
If you use viewHelper
you should refactor the view class and template into
a component with the same name as the view helper you registered.
makeBoundHelper
, registerBoundHelper
, helper
, registerHelper
If you have for example:
app/helpers/foo-bar.js
export default Ember.HTMLBars.makeBoundHelper(function(firstArg, secondArg, options) {
let { hash } = options;
// helper code
});
or
Ember.Handlebars.registerHelper('foo-bar', function(firstArg, secondArg, options) {
let { hash } = options;
// helper code
});
you can replace those with:
app/helpers/foo-bar.js
export default Ember.Helper.helper(function([firstArg, secondArg], hash) {
// helper code
});