Creating leave and concurrent animations with ngView
AngularJS provides hooks used to define a custom animation when a directive fires a leave event. The following directives will generate leave events:
ngIf: This fires theleaveevent just before thengIfcontents are removed from the DOMngInclude: This fires theleaveevent when the existing included content needs to be animated awayngRepeat: This fires theleaveevent when an item is removed from the list or when an item is filtered outngSwitch: This fires theleaveevent just after thengSwitchcontents change and just before the former contents are removed from the DOMngView: This fires theleaveevent when the existingngViewcontent needs to be animated awayngMessage: This fires theleaveevent when an inner message is removed
Getting ready
Suppose that you want to attach a slide-in or slide-out animation to a piece of the DOM that exists inside the ng-view directive. Route changes that cause the content of ng-view to be altered will...