title: Setting the default route with Angular lazy loaded modules
body: <p>I'm lazy loading modules with Angular, but if I navigate to the URL without providing a route path, e.g. <code>http://localhost:4200</code> it loads my <code>about.module</code> when I'd expect the <code>home.module</code> to be loaded. Eagerly loading the modules works as expected.</p>
  
  <p>Each module has a <code>*-routing.module</code>:</p>
  
  <p><strong>app-routing.module.ts</strong></p>
  
  <pre><code>/* ... */
  
  const routes: Routes = [
    {
      path: 'home',
      loadChildren: () =&gt; import('./modules/home/home.module').then(m =&gt; m.HomeModule)
    },
    {
      path: 'about',
      loadChildren: () =&gt; import('./modules/about/about.module').then(m =&gt; m.AboutModule)
    },
    {
      path: '',
      redirectTo: 'home',
      pathMatch: 'full'
    },
    {
      path: '**',
      redirectTo: 'page-not-found'
    }
  ];
  
  @NgModule({
    imports: [
      RouterModule.forRoot(
        routes
        /* ... */
      )
    ],
    exports: [RouterModule]
  })
  
  /* ... */
  </code></pre>
  
  <p><strong>home-routing.module.ts</strong></p>
  
  <pre><code>/* ... */
  
  const routes: Routes = [
    {
      path: '',
      component: HomeComponent,
      data: {
        title: 'Home'
      }
    }
  ];
  
  @NgModule({
    imports: [
      /* ... */
      RouterModule.forChild(routes)
    ],
    exports: [RouterModule]
  })
  
  /* ... */
  </code></pre>
  
  <p><strong>about-routing.module.ts</strong></p>
  
  <pre><code>/* ... */
  
  const routes: Routes = [
    {
      path: '',
      component: AboutComponent,
      data: {
        title: 'About'
      }
    }
  ];
  
  @NgModule({
    imports: [
      /* ... */
      RouterModule.forChild(routes)
    ],
    exports: [RouterModule]
  })
  
  /* ... */
  </code></pre>
  
  <p>Other solutions I have tried and are for an older version of Angular don't seem to work:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/49194645/unable-to-redirect-to-lazy-loaded-module-as-default-route-url-on-server-start-up/49195647#49195647">Unable to redirect to Lazy Loaded module as default route/url on server start up</a></li>
  </ul>
  
  <p>I'm working with Angular 8+ in this case.</p>