title: Reload AngularJS module without page reloading
body: <p>I have some computations in myapp.config functions. They are performed when the page is loaded (or bootstrapped). I need to repeat these computations after that (e.g. after clicking a button or authentication ;-)).</p>
  
  <p>So what I need is</p>
  
  <ol>
  <li>Execute myapp.config functions while loading the page. That is performed natively by Angular.</li>
  <li>The user clicks the button (that is just an example).</li>
  <li>Execute myapp.config functions again. <strong>how can I do that?</strong></li>
  </ol>
  
  <p>$router.reload() (or $state from ui-router) reloads controllers, config functions will not be executed again.</p>
  
  <p>$window.location.reload() will do that but the page will be reloaded, I do not want to reload the page (i.e. the user should not see that I'm hacking around).</p>
  
  <p>Manual bootstrapping may be what I need but I'm not sure how to use it for this. I cannot execute the following code twice (for the first load and after the user clicked the button) because of the error "the element is already bootstrapped".</p>
  
  <pre><code>angular.element(document).ready(function() {
      angular.bootstrap(document, ['myapp']);
  });
  </code></pre>
  
  <p>Any ideas how I can execute config code twice?</p>