fix(app): fix page return to top after changing tab

Close #56
pull/88/head
tibing 2016-06-22 11:46:32 +03:00
parent dda370e61b
commit 7c7574d099
1 changed files with 7 additions and 1 deletions

View File

@ -15,4 +15,10 @@ angular.module('BlurAdmin', [
'BlurAdmin.theme',
'BlurAdmin.pages'
]);
]).run(scrollTop);
function scrollTop($rootScope) {
$rootScope.$on('$stateChangeSuccess', function(){
window.scrollTo(0, 0);
});
}