I have code that detects routing in controller Angular JS:
$scope.$on('$routeChangeSuccess', function() {
if($routeParams.user){
// AJAX
}
});
When I am on page with URL for this routing and do new AJAX request then the previous code is executed again. How to disable repeating executable?