Action not working? Why?

Hello!

application/route.js
I display some component like that:
this.render(template, { into: 'someAoo', outlet: 'someoutlet', controller: 'someController' });

template.hbs my component
<a href="#" {{action "closeAction"}} class="someclass">Some link</a>

in controller ‘someController’ i have action like this
closeAction()
But, when i clicked link, i haver error
Uncaught Error: component had no action handler for: closeAction


why?

Hello,

Components are isolated: closeAction() must be define in your “component.js”. see Handling Events - Components - Ember Guides.

1 Like