title: How to unload angularjs modules
body: <p>I have an application that consists of N Modules. Almost all of those modules will be loaded on demand.</p>
  
  <p>Is there any good way to organize AngularJS application with dynamically loaded and unloaded modules?</p>
  
  <h1>Why do we need unload modules</h1>
  
  <ul>
  <li>Number of Modules (N) can be as much as possible and I can't guarantee any maximum number of them. So I try to avoid excessive use of the memory;</li>
  <li>I don't think it is the best practice to leave the code inside browser that we not going to use (I don't like the idea that tab with my webapp will consume all available memory and will hangs the browser);</li>
  <li>I think Google is too going that way. You can work with your Gmail whole the day and it's still running properly (<em>Google I/O 2013 - A Trip Down Memory Lane with Gmail and DevTools</em> <a href="http://www.youtube.com/watch?v=x9Jlu_h_Lyw" rel="nofollow noreferrer">http://www.youtube.com/watch?v=x9Jlu_h_Lyw</a>).</li>
  </ul>
  
  <h1>Linked</h1>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/18891169/the-nested-modules-in-angularjs">the Nested Modules in AngularJS</a></li>
  </ul>