ember-noop
v1.0.2
Published
The default blueprint for ember-cli addons.
Downloads
3,105
Maintainers
Readme
ember-noop
Ever wanted to have an optional action? maybe with the on
modifier?
Now you can!
Using the noop
helper
<button {{on 'click' (if this.condition this.myAction (noop))}}>
if condition is falsey, clicking won't do anything
</button>
Using the fn-if
helper
<button {{on 'click' (fn-if this.condition this.myAction)}}>
This provides a shorthand for the above
</button>
Note: It's recommended to use disabled
with unclickable buttons.
Compatibility
- Ember.js v3.11+
- Ember.js v2.18+ with the on modifier polyfill
- Any Ember version, because these are just helpers, and helper have been around for a while.
Installation
ember install ember-noop
Contributing
See the Contributing guide for details.
License
This project is licensed under the MIT License.