Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

Call and action on a component from a controller

$
0
0

@JordanRDesigns wrote:

Not sure if this is possible or the best way to do this, but I have a component that takes and input and upon sliding a button over it will fire an action that using sendAction() to bubble that up where the item controller that has the component rendered in it's template will catch it and call an ajax function.

What I want is when that ajax function resolves with a success, for the button that the user slid over to animate back so they can enter a new input and do it again if they wanted to. I know I can put this animation logic in the success callback of the ajax function but I was wondering if there was a way to keep all that animation logic in the component and out of the controller and just have the controller "defer" the animating to the component by telling the component to animate the button back to where it started.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles