title: Dynamic loading using systemjs, how to not load all files at once?
body: <p>There is a main <code>app.js</code> file which has <code>import {Route} from "./router"</code>. Router - a class that depending on the the current <code>url</code> of page, will create an instance of this page handler. For example, for page <code>/home/accountPage</code> - router will create a handler in this way: <code>return new AccountPageHandler(params)</code>. It turns out that in the router imported all handlers of all pages (and them so much). And when I do <code>System.import ( 'js/app.js')</code> I will loaded all the scripts, including and unnecessary - because they are imported into the router, and the router imported in app.js.</p>
  
  <p>How can I make so that does not import all at once, and only that I want to use? I am sure that this problem is already getting up earlier for many developers, but how to fix it - I have no idea because I faced with for this first time.</p>
  
  <p><strong>P.S.</strong></p>
  
  <p>My javascript is generated from the typescript (if suddenly this affects the options for solving the problem).</p>