A simple pubsub mechanism for Ember.js
Questions? Ping me @gavinjoyce
This is an Ember CLI addon, to install:
npm install ember-pubsub --save
import PubSub from 'ember-pubsub/pubsub';
var pubsub = PubSub.create();
pubsub.subscribe('sayHello', this, function(name) {
console.log('hello ' + name);
});
pubsub.publish('sayHello', 'Alex'); // => hello Alex
pubsub.unsubscribe('sayHello');
git clone
this repositorynpm install
bower install
ember server
- Visit your app at http://localhost:4200.