What muchweb said is correct if all you need to do is observe state that changed because of some other component’s action. However, I can see how that wouldn’t be enough, so I offer this alternative:
I’m afraid that emitting actions from your controller that the component listens to isn’t easy. Making a view listen is relatively easy:
App.ListeningView = Ember.View.extend({
didInsertElement: function () {
this.get('controller').on('emittedAction', function () {
// do stuff
});
}
});
App.SomeController = Ember.Controller.extend(Ember.Evented, {
actions: {
'emittedAction': function () {
this.trigger('emittedAction');
}
}
});
Do you see why this wouldn’t work for components? Components have no way of getting at their controller to register .on('emittedAction')
.
Docs about this.