Skip to content

Instantly share code, notes, and snippets.

@pwfisher
Created December 16, 2014 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwfisher/073b5c42d8f84463ddbf to your computer and use it in GitHub Desktop.
Save pwfisher/073b5c42d8f84463ddbf to your computer and use it in GitHub Desktop.
"bubble" action for all Ember components which sends the given action
Ember.Component.reopen({
actions: {
bubble: function (action) {
console.log('[Component action.bubble]', arguments);
var temp = this.get(action);
this.set(action, action);
this.sendAction(action);
this.set(action, temp);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment