title: How to manually lazy load a module?
body: <p>I've tried loading modules without router using <a href="https://angular.io/docs/ts/latest/api/core/index/SystemJsNgModuleLoader-class.html"><code>SystemJsNgModuleLoader</code></a>, but couldn't get it to work:</p>
  
  <pre><code>this.loader.load(url).then(console.info);
  </code></pre>
  
  <p>I'm getting <code>Cannot find module xxx</code> for whatever string I use for URL (aboslute/relative urls/paths... tried many options). I looked through Router source code and couldn't find anything other then this <code>SystemJsNgModuleLoader</code>. I'm not even sure I should be using this...</p>
  
  <hr>
  
  <p>This question was asked just yesterday at <code>ng-europe 2016</code> conference - Miško &amp; Matias answered:</p>
  
  <blockquote>
    <p><strong>Miško Hevery:</strong>
    One just has to <em>get hold of the module</em>, from there you can get the hold of component factory and you can dynamically load component factory anywhere you want in the application. This is exactly what the router does internally. So it's quite strait forward for you to do that as well.</p>
    
    <p><strong>Matias Niemelä</strong>
    The only special thing to note is that on the [Ng]Module there's something called <code>entryComponents</code> and that identifies components that could be lazy loaded - that's the entry into that component set. So when you have modules that are lazy loaded, please put <em>the stuff</em> into <code>entryComponents</code>.</p>
  </blockquote>
  
  <p>...but it's not that strait forward without examples and poor docs on the subject (; </p>
  
  <p>Anyone knows how to load modules manually, without using <code>Route.loadChildren</code>? How to <em>get hold of the module</em> and what exactly is <em>the stuff</em> that should go into <code>entryComponents</code> (I read <a href="https://angular.io/docs/ts/latest/cookbook/ngmodule-faq.html#!#q-entry-component-defined">FAQ</a>, but can't try without actually loading module)?</p>