title: lazy load router in angular
body: <p>I'm trying to use the lazy loading routes but I got this error</p>
  <pre><code>ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'home'
  Error: Cannot match any routes. URL Segment: 'home'
      at ApplyRedirects.noMatchError (router.js:2658)
      at CatchSubscriber.selector (router.js:2652)
      at CatchSubscriber.error (catchError.js:27)
      at MapSubscriber._error (Subscriber.js:75)
      at MapSubscriber.error (Subscriber.js:55)
      at MapSubscriber._error (Subscriber.js:75)
      at MapSubscriber.error (Subscriber.js:55)
      at ThrowIfEmptySubscriber._error (Subscriber.js:75)
      at ThrowIfEmptySubscriber.error (Subscriber.js:55)
      at TakeLastSubscriber._error (Subscriber.js:75)
      at resolvePromise (zone.js:1213)
      at resolvePromise (zone.js:1167)
      at zone.js:1279
      at ZoneDelegate.invokeTask (zone.js:406)
      at Object.onInvokeTask (core.js:28667)
      at ZoneDelegate.invokeTask (zone.js:405)
      at Zone.runTask (zone.js:178)
      at drainMicroTaskQueue (zone.js:582)
  </code></pre>
  <p>I cant understand what am i doing wrong  this is my admin routes</p>
  <pre class="lang-js prettyprint-override"><code>import { NgModule } from '@angular/core';
  import { RouterModule, Routes } from '@angular/router';
  import { AdminComponent } from './admin.component';
  
  const routes: Routes = [
    { 
      path: '',
      children: [
        { path:'home',component:AdminComponent },
        { path:'**',redirectTo:'/home' },
      ]
    },
  ];
  
  @NgModule({
    imports: [RouterModule.forChild(routes)],
    exports: [RouterModule]
  })
  export class AdminRoutingModule { }
  </code></pre>
  <p>This is my principal route</p>
  <pre class="lang-js prettyprint-override"><code>import { NgModule } from '@angular/core';
  import { RouterModule, Routes } from '@angular/router';
  import { LoginComponent } from './components/login/login.component';
  
  const routes: Routes = [
    { path:'signIn',component:LoginComponent },
    { path: 'admin',
      loadChildren: () =&gt; import('./components/admin/admin.module').then(m =&gt; m.AdminModule) 
    },
    { path:'**',redirectTo:'/signIn' },
  ];
  
  @NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule]
  })
  export class AppRoutingModule { }
  </code></pre>
  <p>And my app architecture:</p>
  <p><a href="https://i.stack.imgur.com/Lp7kN.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>I'm using angular 12 and the <code>router-outlet</code> is on my <em>app-component.html</em>.</p>