问题
I have a State Manager implementation with 2 view states. I want to defer the normal removal of a state and add a custom animation when the view is being destroyed and State Manager is transitioning to another state.
Here is a jsFiddle: http://jsfiddle.net/Xkg6X/
For some reason, hide function of each view state is not being triggered where I can create a custom animation for removal.
Reference: Deferring removal of a view so it can be animated
回答1:
You don't ever call the hide function, so it's not going to get executed.
You can use the async transition feature of the state manager to achieve what you're trying to do. Here's a jsFiddle: http://jsfiddle.net/Xkg6X/1/
来源:https://stackoverflow.com/questions/10854438/animate-view-states-in-state-manager