title: AngularJs - Integratable or dynamic modules
body: <p>The requirement is to have my AngularJs application or product split into different sub products. Depending on the license, we will integrate the sub product in the main product e.g.</p>
  
  <pre><code>MainApplication or MainProduct
      |
      --- Core Application  (default)
      --- Free Module2  (default)
      --- Free Module3  (default)
      --- Paid Module4  (module4)
      --- Paid Module5  (module5)
  </code></pre>
  
  <p>The application/product is packaged / deployed in a war</p>
  
  <ol>
  <li>A <code>default</code> build will package core module1, module2 &amp; module3.</li>
  <li>A build with parameter <code>module4</code> will package core module1, module2, module3 and module4 not module5</li>
  <li>A build with parameter <code>module5</code> will package core module1, module2, module3 and module5 not module4</li>
  <li>A build with parameter <code>module4 module5</code> will package everything. </li>
  </ol>
  
  <p>I am not sure if this is possible. Any suggestion / pointers is welcome.</p>
  
  <p><strong>Update</strong>
  It appears requirejs or oclazyload may help to achieve something similar. 
  The main reason of posting this question is to see views of the experts and how people have approached to this.</p>
  
  <p><strong>P.S</strong>
  I am already following the styleguide for large applications within the sub projects. </p>