84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
页面底部的导航用 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