На $routeChangeStart
мне нравится применять of-h
класс, а на $routeChangeSuccess
либо удалять of-h
класс, либо менять его на of-v
класс. Теперь применяется только класс of-h
.
HTML
<div class="container-outer" ng-class="addClassOnRouteChange">
<div class="container" ng-view autoscroll="true" ng-class="fadeNgView">
<!-- Views will be rendered here -->
</div>
</div>
JS
angular.module('starter', ['ngRoute', 'ngAnimate', 'myApp.controllers'])
.run(['$window', '$location','$rootScope', function ($window, $location, $rootScope) {
$rootScope.fadeNgView = '';
$rootScope.$on('$routeChangeStart', function() {
//event button item list to move forward
$rootScope.next = function() {
console.log('start');
$rootScope.fadeNgView = 'fade-ng-view';
$rootScope.addClassOnRouteChange = 'of-h';
}
});
$rootScope.$on('$routeChangeSuccess', function (event, current, previous) {
$rootScope.addClassOnRouteChange = 'of-v';
});
}]);
$rootScope.$apply.addClassOnRouteChange = 'of-v'
, но не повезло :( - person Syed   schedule 14.06.2017