title: Lazy load module with route params and named router outlet
body: <p>I have a route / component that requires a route parameter and has a named outlet. I want to lazy load a module and activate this route. Here are my routes:</p>
  
  <p>Profile Module (sub module) Routes:</p>
  
  <pre><code>const routes: Routes = [
  {
    path: ':id', component: ProfileComponent
    children: [
     { path: 'list/:id', component: ListComponent, outlet: 'sidebar' },
     { path: 'risk/:id', component: RiskComponent, outlet: 'sidebar' }
    ], 
  ];
  </code></pre>
  
  <p>Parent Module Routes</p>
  
  <pre><code>const routes: Routes = [
    { path: 'projects/profile',
      loadChildren: './profile/profile.module#ProfileModule' }
   ]
  </code></pre>
  
  <p>Loading the route results in the error: </p>
  
  <p><em>Error: Cannot match any routes. URL Segment: 'projects/profile/-3'</em></p>
  
  <p>When I use an empty string for the path in the sub module, there is no error and the module loads but the component doesn't load. I found <a href="https://stackoverflow.com/a/46921614/6569899">this help</a> with lazy loading route params and <a href="https://stackoverflow.com/a/47487220/6569899">this help</a> with lazy loading named router outlets, but neither worked.</p>
  
  <p>My question is:
  How do I lazy load a route with a route parameter and named router outlet?</p>
  
  <p>--Edit--</p>
  
  <p>Here is a <a href="https://stackblitz.com/edit/angular-8-communicating-between-components-x7phcm" rel="nofollow noreferrer">demo app</a> that shows my problem. I created 3 main routes: one that lazy loads a submodule without named outlets, one the that lazy loads with a named outlet, and one that doesn't use lazy loading. In the UI, the link to the route that has a named outlet produces the error above.</p>