Amber 1.13.10
I wanted to try closing actions, so I defined a route:
import Ember from 'ember';
export default Ember.Route.extend({
actions: {
doSave() { ... }
}
});
and pattern:
{{my-component onSave=(action 'doSave')}}
But I get an error message: An action named 'doSave' was not found in (generated test.index controller).
However, it is determined on the route. Given the fact that Controllers are deprecated in Ember, I would expect the action to be defined on the route instead of the controller. Is there a specific reason why closing actions should be defined on the controller?
source
share