This attribute
modifier is made for declarative attribute bindings for DOM nodes.
This addon is heavily "inspired" by ember-class-modifier.
When you want to conditionally apply a list of variable attributes onto an element,
it's a pain (especially for data-test
attributes).
// component.js
myAttributes = ['data-test-thing', 'data-test-other-thing']
// also works like
myAttributes = 'data-test-thing, data-test-other-thing'
Conditionally remove attributes based on booleans
// component.js
isDisabled = false
- Ember.js v3.4 or above
- Ember CLI v2.13 or above
- Node.js v8 or above
ember install ember-attribute-modifier
[Longer description of how to use the addon in apps.]
See the Contributing guide for details.
This project is licensed under the MIT License.