Function
helper (helper) public
Module:
ember
Defined in packages/ember-htmlbars/lib/helper.js:94
Available since v1.13.0
- helper
- Function
- The helper function
In many cases, the ceremony of a full Ember.Helper
class is not required.
The helper
method create pure-function helpers without instances. For
example:
1 2 3 4 5 6 |
// app/helpers/format-currency.js export default Ember.Helper.helper(function(params, hash) { let cents = params[0]; let currency = hash.currency; return `${currency}${cents * 0.01}`; }); |