title: Angular2 RC5 router can't find module (lazy load)
body: <p>I have a pretty simple Angular2 RC5 test project which attempts to use routing to lazy load modules. I can't see what's wrong with the project.</p>
  
  <p><strong>Folders</strong></p>
  
  <pre><code>app
    |-about (contains about.module.ts and about.component.ts)
    |-home (contains home.module.ts, home.component.ts)
  </code></pre>
  
  <p><strong>app.routing.ts</strong></p>
  
  <pre><code>export const routes: Routes = [
      { path: '', redirectTo: 'home', pathMatch: 'full' },
      { path: 'home', loadChildren: './app/home/home.module' },
      { path: 'about', loadChildren: './app/about/about.module' }
  ];
  
  export const routing = RouterModule.forRoot(routes);
  </code></pre>
  
  <p><strong>home.module.ts</strong></p>
  
  <pre><code>import { NgModule }         from '@angular/core';
  import { HomeComponent }    from './home.component';
  
  @NgModule({
      declarations: [HomeComponent],
      exports: [HomeComponent]
  })
  
  export default class HomeModule { }
  </code></pre>
  
  <p><strong>home.component.ts</strong></p>
  
  <pre><code>import { Component }        from '@angular/core';
  
  @Component({
      template: `&lt;h2&gt;Home...&lt;/h2&gt;`
  })
  
  export class HomeComponent { }
  </code></pre>
  
  <p>I know the redirect to "home" is working, at startup I can see that home.module.js and home.component.js files are downloaded, but then it throws a console error message <code>Cannot find 'HomeModule' in './app/home/home.module'</code> (and in the network traffic tab I can confirm that both of the js files are correct, spelling is correct, etc.)</p>