Function
helper (helper) public
Module: | @ember/component |
---|
Defined in packages/@ember/-internals/glimmer/lib/helper.ts:255
Available since v1.13.0
import { helper } from '@ember/component/helper';
- helper
- Function
- The helper function
In many cases it is not necessary to use the full Helper
class. The helper
method create pure-function helpers without instances. For example:
currency.js
import { helper } from '@ember/component/helper'; export default helper(function([cents], {currency}) { return `${currency}${cents * 0.01}`; });
© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/3.25/functions/@ember%2Fcomponent%2Fhelper/helper