昊爷

导航

 
 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

 

posted on 2017-01-18 17:03  昊爷  阅读(10602)  评论(0编辑  收藏  举报