ember-closure-actions-polyfill
v0.0.1
Published
The default blueprint for ember-cli addons.
Downloads
1
Readme
ember-closure-actions-polyfill
It's pretty hacky. Use at your own risk.
Provides a polyfill for the Closure Actions feature added in Ember 1.13.
Installation
ember install ember-closure-actions-polyfill
Usage
// app/controllers/index.js
import Controller from '@ember/controller';
export default Controller.extend({
actions: {
setName(name) {
model.set('name', name);
}
}
});
{{!-- app/templates/index.hbs --}}
{{my-component submit=(action 'setName')}}
import Component from '@ember/component';
export default Component.extend({
click() {
this.submit(this.get('name'));
}
});
Contributing
Installation
git clone <repository-url>
cd ember-closure-actions-polyfill
yarn install
Linting
yarn lint:js
yarn lint:js --fix
Running tests
ember test
– Runs the test suite on the current Ember versionember test --server
– Runs the test suite in "watch mode"yarn test
– Runsember try:each
to test your addon against multiple Ember versions
Running the dummy application
ember serve
- Visit the dummy application at http://localhost:4200.
For more information on using ember-cli, visit https://ember-cli.com/.
License
This project is licensed under the MIT License.