| Module: | @ember/helper |
|---|
Defined in packages/@ember/helper/index.ts:5
import { capabilities } from '@ember/helper'; capabilities returns a capabilities configuration which can be used to modify the behavior of the manager. Manager capabilities must be provided using the capabilities function, as the underlying implementation can change over time.
The first argument to capabilities is a version string, which is the version of Ember that the capabilities were defined in. Ember can add new versions at any time, and these may have entirely different behaviors, but it will not remove old versions until the next major version.
capabilities('3.23'); The second argument is an object of capabilities and boolean values indicating whether they are enabled or disabled.
capabilities('3.23', {
hasValue: true,
hasDestructor: true,
}); If no value is specified, then the default value will be used.
3.23 capabilitieshasDestroyableDetermines if the helper has a destroyable to include in the destructor hierarchy. If enabled, the getDestroyable hook will be called, and its result will be associated with the destroyable parent block.
hasValueDetermines if the helper has a value which can be used externally. The helper's getValue hook will be run whenever the value of the helper is accessed if this capability is enabled.
© 2022 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/4.9/functions/@ember%2Fhelper/capabilities