Sending action to specific target from ember component


#1

I am using actions to wire up communication between components in ember. Is there a way to send an action from a component to a specific object ?

In the template action helper I can do this

{{action 'doSomething' target=myOtherEmberComponent}}

However when its a custom component which emits an internal action “internalAction”, there is no way to specify a target object

{{my-ember-component internalAction="doSomething"}} // how to specify target here?

Is there an easy way to do this?


#2

http://jsbin.com/giceqehiwu/1/edit?html,js,console targetObject

If you want two components to talk to each other you could do something funky like this:

Hopefully you just want to first solution… just decided to have fun with the second.