Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 我可以为$anchorScroll制作动画吗?_Angularjs - Fatal编程技术网

Angularjs 我可以为$anchorScroll制作动画吗?

Angularjs 我可以为$anchorScroll制作动画吗?,angularjs,Angularjs,我一直在使用$anchorScroll从页面顶部跳到底部,如下所示: app.controller('homeCntl', function($scope, $location, $anchorScroll){ $scope.goToBottom = function() { $location.hash('bottomOfPage'); $anchorScroll(); } }); 这很好,它会跳到页面底部 虽然看起来不太好,但我想知道是否有办

我一直在使用$anchorScroll从页面顶部跳到底部,如下所示:

app.controller('homeCntl',
function($scope, $location, $anchorScroll){
    $scope.goToBottom = function() {
        $location.hash('bottomOfPage');
        $anchorScroll();
    }
});
这很好,它会跳到页面底部

虽然看起来不太好,但我想知道是否有办法添加动画/过渡效果

或者,如果我想看看另一种方法,比如制作指令或使用jquery


谢谢。

否,
ngAnimate
不支持
$anchorScroll
$anchorScroll本身也没有公开任何API来构建动画