Make sure the scroll is at the top of the page on every route change

This commit is contained in:
Joseph Schorr 2014-05-21 15:28:38 -04:00
parent e81d0a0514
commit d209929133

View file

@ -4815,8 +4815,8 @@ quayApp.directive('ngVisible', function () {
};
});
quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanService', '$http', '$timeout', 'CookieService',
function($location, $rootScope, Restangular, UserService, PlanService, $http, $timeout, CookieService) {
quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanService', '$http', '$timeout', 'CookieService', '$anchorScroll',
function($location, $rootScope, Restangular, UserService, PlanService, $http, $timeout, CookieService, $anchorScroll) {
// Handle session security.
Restangular.setDefaultRequestParams(['post', 'put', 'remove', 'delete'], {'_csrf_token': window.__token || ''});
@ -4923,6 +4923,7 @@ quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanServi
}
$rootScope.fixFooter = !!current.$$route.fixFooter;
$anchorScroll();
});
$rootScope.$on('$viewContentLoaded', function(event, current) {