title: How to reload or re-render the entire page using AngularJS
body: <p>After rendering the entire page based on several user contexts and having made several <code>$http</code> requests, I want the user to be able to switch contexts and re-render everything again (resending all <code>$http</code> requests, etc). If I just redirect the user somewhere else, things work properly:</p>
  
  <pre><code>$scope.on_impersonate_success = function(response) {
    //$window.location.reload(); // This cancels any current request
    $location.path('/'); // This works as expected, if path != current_path
  };
  
  $scope.impersonate = function(username) {
    return auth.impersonate(username)
      .then($scope.on_impersonate_success, $scope.on_auth_failed);
  };
  </code></pre>
  
  <p>If I use <code>$window.location.reload()</code>, then some of the <code>$http</code> requests on <code>auth.impersonate(username)</code> that are waiting for a response get cancelled, so I can't use that. Also, the hack <code>$location.path($location.path())</code> doesn't work either (nothing happens).</p>
  
  <p>Is there another way to re-render the page without manually issuing all requests again?</p>