var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope, $location, $anchorScroll) {
$scope.name = 'Bitches';
$scope.toTop = function(){
$location.hash('topLink');
$anchorScroll();
};
$scope.toBottom = function(){
$location.hash('bottomLink');
$anchorScroll();
};
});
<!DOCTYPE html>
<html ng-app="plunker">
<head>
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<script>
document.write('<base href="' + document.location + '" />');
</script>
<link rel="stylesheet" href="style.css" />
<script data-require="angular.js@1.4.x" src="https://code.angularjs.org/1.4.12/angular.js" data-semver="1.4.9"></script>
<script src="app.js"></script>
</head>
<body ng-controller="MainCtrl">
<p>Hello {{name}}!</p>
<a href='' id="topLink" ng-click="toBottom()">Jump to Bottom</a>
<div style="height:10000px"></div>
<a href='' id="bottomLink" ng-click="toTop()">Jump to Top</a>
</body>
</html>
/* Put your css in here */