title: How to "refresh" a single page application
body: <p>Suppose I have a single page application that makes AJAX requests to <code>http://www.somesite.com/resources?lang=en</code>.</p>
  
  <p>Now, let's say that my application has a special variable for the request's languages, that is, if the variable's value is <code>en</code>, then the AJAX request will send a query param <code>lang=en</code>.</p>
  
  <p>For now, the two possible values are <code>en</code> and <code>es</code>.</p>
  
  <p>This variable's value can be changed dynamically by the user (clicking a button).</p>
  
  <p>So, if we are using the application with <code>language = en</code>, then the application will send the <code>lang=en</code> query parameter. If the user changes the language to <code>es</code>, then I want the application to <strong><em>resend</em></strong> all the AJAX requests but now with <code>lang=es</code> query parameter.</p>
  
  <p>It would be like refreshing the website, but asynchronously via AJAX requests.</p>
  
  <p>I have been thinking this yesterday and I can't find a way to handle this logic in an AngularJS application.</p>
  
  <p>I'm not an expert in AngularJS, but I understand the concepts of modules, directives, services and controllers.</p>
  
  <p>What would be the best approach to handle this scenario? That is, I would like to avoid having to call each AJAX request manually, I'd rather create an automatic way of doing this.</p>