Skip to content

Instantly share code, notes, and snippets.

@elidupuis
Last active September 1, 2015 17:42
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 elidupuis/657182e8b86e05a05f56 to your computer and use it in GitHub Desktop.
Save elidupuis/657182e8b86e05a05f56 to your computer and use it in GitHub Desktop.
Closure action not bubbling to Route; controller is not define...
// components/split-view/component.js
actions: {
showUserPopover() {
// Ember.debug('showUserPopover action from split-view');
// Getting error: `An action named 'showUserPopover' was not found in (generated classes controller).`
// got same result using closure action instead of `sendAction`
this.sendAction('showUserPopover');
}
}
// need to get here to handle action properly...
actions: {
showUserPopover() {
Ember.debug('route showUserPopover action');
}
}
{!--
Closure action bubbled up from child components
--}
{{#split-view foobar=(action 'showUserPopover') as |panel|}}
{!-- ... --}
{{/split-view}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment