Has somebody found a good way to animate state transitions?
The router immediately removes the view from the DOM. The problem with that is that I can't defer that until the end of the animation. Note: I'm using v1.0.0-pre.4.
Has somebody found a good way to animate state transitions?
The router immediately removes the view from the DOM. The problem with that is that I can't defer that until the end of the animation. Note: I'm using v1.0.0-pre.4.
I know this is pretty old, but the best solution for this context-specific animation today is probably ember liquid fire.
It allows you to do things like this in a transition file:
I've found another drop-in solution that implements animations in Views: ember-animate
Example:
Demo: author's personal website
I'll expand on Lesyk's answer. If you need to apply it to multiple views in a DRY way, you can create a customization class like this:
And then in your code you apply it on your various view classes. As Ember depends on jQuery you can use pretty much any jQuery animation.
Ran into this same requirement on my app. Tried Ember Animated Outlet, but didn't give the granularity I needed (element specific animations).
The solution that worked for me was as follows --
Change linkTo to be an action
Becomes...
Create Method for goToTodos in current controller
Finally -- To animate in elements on the Todos Template, use didInsertElement on the view
So far, this is the most elegant solution I've found for element specific animations on transition. If there is anything better, would love to hear!
Billy's Billing just released an Ember module that supports animated transitions.