How do I dynamically set an animation using ng-view in Angular?
I'm using an ng-view to transition between views using animation (angular 1.2RC1). To determine the direction the animation should take, I'm inserting a class either of slide-left or slide-right on the ng-view div before calling my location change. The leave animation (first to run) works but then removes my class from the ng-view div. I use a service to determine whether to slide left or slide right as follows: $scope.slideView = function(index, url){ if ( viewSlideIndex.getViewIndex() > index) { $('#slideview') .toggleClass("slide-left", false) .toggleClass("slide-right", true); } else { $('#slideview') .toggleClass("slide-left", true) .toggleClass("slide-right", false); }; $location.url(url); } which updates the class in the ng-view div: Pg1 Pg2 Pg3 It looks as though the slideView (ng-view) classes have already been cached and are refreshed upon completi...