Hello Xin Li ,
So here’s the case,
Let’s say you have ‘setFooAsBar’ as an action defined in controller. This will be called wherever you have mapped this action in a component on the page. (PS: You can either use (action ‘setFooAsBar’) or just setFooAsBar=’setFooAsBar’ in the component definition).
If you happen to have the same in the route and not in the controller, the second approach or setFooAsBar=’setFooAsBar’ will work but not setFooAsBar=(action ‘setFooAsBar’). To make this work, you might have to proxy this action in the controller.
There is one other problem. If you define ‘setFooAsBar’ as action in both controller and route and happen to do a this.send(‘setFooAsBar’) in the controller action it would end in a MaxCallStack error.
Do let me know if you have any queries. Happy to help! Do enlighten me with your insights.
Thanks,
AB
