title: Angular lazy loading routing always goes to wildcard module
body: <p>I am working on a new Angular application that has multiple modules. I am still struggling to get my routing correct. In the following (simplified) example, I want to lazy load the <code>StoreModule</code>. If no url is given, I want my application to redirect to <code>/store</code>. If an invalid URL is given, I want my <code>NotFoundComponent</code> to be shown. In my current configuration however, the <code>NotFoundComponent</code> is always shown, regardless of the URL. Do you guys see what I am doing wrong?</p>
  
  <p>This is my <code>app.module.ts</code> file, I would expect it to only use the <code>RouterModule</code> provided in <code>NotFoundModule</code> if no URL matches can be made. </p>
  
  <p><strong>app.module.ts</strong></p>
  
  <pre><code>@NgModule({
    declarations: [
      AppComponent
    ],
    imports: [
      BrowserModule,
      AuthModule,
      RouterModule.forRoot([
        { path: '', redirectTo: 'store', pathMatch: 'full'},
        { path: 'store', loadChildren: 'app/store/store.module#StoreModule'},
        { path: 'login', component: LoginComponent },
      ]),
      LoginModule,
      NotfoundModule,
    ],
    bootstrap: [AppComponent],
    exports: [RouterModule]
  })
  export class AppModule { }
  </code></pre>
  
  <p>This is my <code>StoreModule</code>. If I comment out the <code>NotFoundModule</code> in my <code>app.module.ts</code> module this all works as expected.</p>
  
  <p><strong>store.module.ts</strong></p>
  
  <pre><code>@NgModule({
    imports: [
      AuthModule,
      CommonModule,
      SharedModule,
      RouterModule.forChild([
        { path: '', pathMatch: 'full', redirectTo: 'dashboard' },
        { path: 'dashboard', component: DashboardComponent, canActivate: [AuthGuard] },
      ]),
    ],
    declarations: [StoreTemplateComponent, DashboardComponent]
  })
  export class StoreModule { }
  </code></pre>
  
  <p><strong>notfound.module.ts</strong></p>
  
  <pre><code>@NgModule({
    imports: [
      CommonModule,
      RouterModule.forChild([
        {
          path: '**',
          component: NotfoundComponent
        }
      ])
    ],
    declarations: [ NotfoundComponent ],
  })
  export class NotfoundModule { }
  </code></pre>