Fix: Scroll to top when navigating to different page
See: https://github.com/freifunkhamburg/ffffng/issues/19
This commit is contained in:
parent
c2bd645e93
commit
e2805d9b8e
1 changed files with 2 additions and 1 deletions
|
@ -61,8 +61,9 @@ angular.module('ffffng', [
|
|||
}
|
||||
};
|
||||
})
|
||||
.run(function ($location, $rootScope, config) {
|
||||
.run(function ($location, $rootScope, $window, config) {
|
||||
$rootScope.$on('$routeChangeSuccess', function (event, current) {
|
||||
$window.scrollTo(0, 0);
|
||||
$rootScope.title = current.$$route ? (current.$$route.title || '') : '';
|
||||
$rootScope.config = config;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue