Angularjs 我可以为$anchorScroll制作动画吗?
我一直在使用$anchorScroll从页面顶部跳到底部,如下所示:Angularjs 我可以为$anchorScroll制作动画吗?,angularjs,Angularjs,我一直在使用$anchorScroll从页面顶部跳到底部,如下所示: app.controller('homeCntl', function($scope, $location, $anchorScroll){ $scope.goToBottom = function() { $location.hash('bottomOfPage'); $anchorScroll(); } }); 这很好,它会跳到页面底部 虽然看起来不太好,但我想知道是否有办
app.controller('homeCntl',
function($scope, $location, $anchorScroll){
$scope.goToBottom = function() {
$location.hash('bottomOfPage');
$anchorScroll();
}
});
这很好,它会跳到页面底部
虽然看起来不太好,但我想知道是否有办法添加动画/过渡效果
或者,如果我想看看另一种方法,比如制作指令或使用jquery
谢谢。否,
ngAnimate
不支持$anchorScroll
$anchorScroll本身也没有公开任何API来构建动画