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();
    });