Angular: Empty Fiddle
http://angularjs.org/
by codef0rmer
HTML
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<div ng-controller="MyCtrl">
<a href="#/1">Go to 1</a>
<a href="#/2">Go to 2</a>
</div>
JavaScript
var myApp = angular.module('myApp',[]);
//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});
function MyCtrl($scope) {
$scope.$on("$routeChangeStart", function (event, next, current) {
alert('amit');
});
}