<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>
<script src="script.js"></script>
</head>
<body ng-app="myApp">
<div ng-controller="TestLocationCtrl">
<button ng-click="set()">$location.hash('Hello')</button>
<button ng-click="reset()">$location.hash('')</button>
</div>
</body>
</html>
// Code goes here
app = angular.module('myApp', []);
app.controller('TestLocationCtrl', [
'$scope',
'$location',
function ($scope, $location) {
$scope.set = function () {
$location.hash('hello');
};
$scope.reset = function () {
$location.hash('');
};
}
])
/* Styles go here */