ember-closure-actions-polyfill

0.0.1 • Public • Published

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 version
  • ember test --server – Runs the test suite in "watch mode"
  • yarn test – Runs ember try:each to test your addon against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.

License

This project is licensed under the MIT License.

Readme

Keywords

Package Sidebar

Install

npm i ember-closure-actions-polyfill

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

232 kB

Total Files

7

Last publish

Collaborators

  • twokul