ember-cli-events-bus

0.0.2 • Public • Published

Events-bus

Simple global events service.

Adds Ember Evented Service to your routs, controllers and components

Service known as eventsBus and globalEvents

Installation

ember install ember-cli-events-bus

Usage

my-component.js

  ...
  actions: {
    save() {
      ...
      this.globalEvents.trigger('foo:bar', data)
      ...
    }
  }
  ...

my-controller.js

  ...
  init() {
    ...
    this.globalEvents.on('foo:bar', this, 'bar')
    ...
  },
  bar(data) {
    ...
  }
  ...

Package Sidebar

Install

npm i ember-cli-events-bus

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • blia