I'm using a tool that offers us an angle that is Angular-scroll
where I have a function that executes a scroll up, but I have not tried to get it, please some solution?
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-scroll/1.0.2/angular-scroll.min.js"></script>
<!DOCTYPE html>
<html ng-app="myApp">
<body>
<div style="width: 100%; height: 120vh;">EXAMPLE</div>
<footer>
<button ng-click="scrollToTop()">To the top!</button>
</footer>
<script>
angular.module('myApp', ['duScroll']).
controller('MyCtrl', ['$scope', '$document', function($scope, $document){
$scope.scrollToTop = function() {
$document.duScrollTop();
};
}]);
</script>
</body>
</html>