fix: when navigating, scroll to top

This commit is contained in:
Marcus Efraimsson 2017-11-30 10:50:10 +01:00
parent 3d2d789ca2
commit 1db9aeaac3

View File

@ -8,6 +8,10 @@ export function geminiScrollbar() {
let scrollbar = new PerfectScrollbar(elem[0]);
scope.$on('$routeChangeSuccess', () => {
elem[0].scrollTop = 0;
});
scope.$on('$destroy', () => {
scrollbar.destroy();
});