Fix scroll position after changing view.

This commit is contained in:
Gustavo Cortez 2014-05-26 17:32:15 -03:00
parent e0e6c94ae7
commit 29c24884e5
4 changed files with 8 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -47,7 +47,7 @@ angular.module('insight')
$locationProvider.html5Mode(true);
$locationProvider.hashPrefix('!');
})
.run(function($rootScope, $route, ngProgress) {
.run(function($rootScope, $route, $location, $routeParams, $anchorScroll, ngProgress) {
$rootScope.$on('$routeChangeStart', function() {
ngProgress.start();
});
@ -60,5 +60,8 @@ angular.module('insight')
$rootScope.title = $route.current.title;
$rootScope.isCollapsed = true;
$rootScope.currentAddr = null;
$location.hash($routeParams.scrollTo);
$anchorScroll();
});
});