Action not working? Why?


#1

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?


#2

Hello,

Components are isolated: closeAction() must be define in your “component.js”. see https://guides.emberjs.com/v2.5.0/components/handling-events/#toc_sending-actions.