Angularjs 滚动条控制

 1 控制滚动条
 2 依赖    $location, $anchorScroll
 3 
 4  $scope.gotoTop = function () {
 5         $location.hash("top");
 6         $anchorScroll();
 7     };
 8     $scope.gotoBottom = function () {
 9         $location.hash("bottom");
10         $anchorScroll();
11 
12     };
13 注意 页面需要有相应的div    id为  top 和bottom
原文地址:https://www.cnblogs.com/kgdjgd/p/6297408.html