页面底部的导航用 ui-sref 跳转新的页面后,不滚动到页面顶部的问题这么解决?
Hello, I also encountered this problem. My previous page scrolled to the bottom, but when I jumped to the new routing page, it was still at the bottom. How do I start from the top
<ui-view autoscroll/>
app.run(['$window', '$rootScope', '$location' ,'$cookieStore', '$state', 'CacheManager', '$timeout', function($window, $rootScope, $location, $cookieStore, $state,CacheManager, $timeout){ $rootScope.$on('$viewContentLoaded', function(){ var interval = setInterval(function(){ if (document.readyState == "complete") { window.scrollTo(0, 0); clearInterval(interval); } },200); }); }]);
This method can be implemented, but I don’t know if it is good for performance
Hello, I also encountered this problem. My previous page scrolled to the bottom, but when I jumped to the new routing page, it was still at the bottom. How do I start from the top
This method can be implemented, but I don’t know if it is good for performance