I have an Ember App where I’m trying to use closure actions, Our setup is the following
The action I need is in application.js called invalidateSession.
Now our routes are nested:
We have download routes that is nested in welcome route that is nested in application route.
Also I have a component within the download template that also renders another component. The components are:
- steps-action (this is rendered inside the download-generic component and is the one that needs to call invalidateSession action that resides in the application route
I tried passing the a closure action to steps-action: (using emblemjs)
= steps-action click=(action “invalidateSession”)
What happens is Ember is looking for the action within the parent component (download-generic). I also tried passin the closure action to the download-generic
= download-generic invalidateSession=(action “invalidateSession”)
What happens is Ember is looking for the action in the download route instead of “bubbling”/looking for the action in the application route.
Now, how do I invoke an action from the application route in a very nested component? how do I make sure that the closure action in the nested component point towards the actions hash of the application route.
Thanks in advance for your help!