title: Named router outlet and lazy loaded modules
body: <p>I have problem with named router outlet and lazy loading module.
  I have 2 router outlets first without name and second is named <strong>mainapp</strong>.</p>
  
  <p><strong>app.component.html</strong></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;router-outlet&gt;&lt;/router-outlet&gt;
  </code></pre>
  
  <p><strong>app.main.component.html</strong></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;router-outlet name="mainapp"&gt;&lt;/router-outlet&gt;
  </code></pre>
  
  <p><strong>app.routes.ts</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>export const routes: Routes = [
      {path: 'login',  component: LoginComponent},
      {path: 'app', component: AppMainComponent, children:[
          {path: '', loadChildren: 'app/client/client.module#ClientModule'}
      ]}
  ];
  </code></pre>
  
  <p><strong>client.module.ts</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>@NgModule({
    imports: [
      SharedModule,
      RouterModule.forChild([
        {path: 'client', component: ClientListComponent, outlet: "mainapp" },
        {path: 'client/:id', component: ClientComponent, outlet: "mainapp" }
      ])
    ],
    declarations: [ClientListComponent, ClientComponent],
    exports: [ClientListComponent, ClientComponent]
  })
  export class ClientModule { }
  </code></pre>
  
  <ol>
  <li>LoginComponent is loaded into router outlet</li>
  <li>After login AppMainComponent is loaded into router outlet</li>
  <li>Now I try load ClientComponent to named router outlet <strong>mainapp</strong></li>
  </ol>
  
  <p>I get error</p>
  
  <pre><code>ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'app'
  Error: Cannot match any routes. URL Segment: 'app
  </code></pre>
  
  <p>When I modified routes to this it works:</p>
  
  <pre class="lang-js prettyprint-override"><code>export const routes: Routes = [
      {path: 'login',  component: LoginComponent},
      {path: 'app', component: AppMainComponent, children:[
          {path: 'client', component: ClientListComponent, outlet: "mainapp" },
          {path: 'client/:id', component: ClientComponent, outlet: "mainapp" }
      ]}
  ];
  </code></pre>