angular-ui/ui-utils — pull request #40 by JimAllanson (2013-06-02 11:38:38+00:00)
Title: Added compatibility with ui-router project

The ui-router module doesn't seem to dispatch a '$routeChangeSuccess' event when the route changes, so I added an additional listener for '$stateChangeSuccess':

$scope.$on('$stateChangeSuccess', function(){
watcher();
});