Today I have come to a shocking discovery: actions referenced on a view are handled by their route, not by the view which referenced it. Ex:
<a href="#" {{action edit}}>Edit this</a>
The edit
action must be defined in the Route, not in the View. When I was not using a Router before the View was the one responsible for handling such events and I was really happy about it.
Can anyone please:
Set the target as view
<a href="#" {{action edit target="view"}}>Edit this</a>
If your action is in controller then use
<a href="#" {{action edit}}>Edit this</a>
Default target refers to the view's controller
I'd suggest you to go through this Reference: Ember Action Helper
I'd like to mention some key points as per the above reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With