title: How to restrict unwanted routes in angular cli?
body: <p>I have set up the routing modules in my angular 8 application using lazy loading. I have set up multiple routing modules. In my authentication routing module, I set a path for <code>/auth/login</code>. However <code>/login</code> also redirects to that same component. How can I restrict this routing? </p>
  
  <p>App-routing.module</p>
  
  <pre class="lang-js prettyprint-override"><code>const routes: Routes = [
    {
      path: "auth",
      loadChildren: "./authentication/authentication.module#AuthenticationModule"
    },
    {
      path: "user",
      loadChildren: "./user/user.module#UserModule"
    },
    {
      path: "**",
      redirectTo: "auth/login"
    }
  ];
  
  @NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule]
  })
  </code></pre>
  
  <p>Authentication-routing.module</p>
  
  <pre class="lang-js prettyprint-override"><code>const routes: Routes = [
    {
      path: "login",
      component: LoginPageComponent
    }
  ];
  
  @NgModule({
    imports: [RouterModule.forChild(routes)],
    exports: [RouterModule]
  })
  </code></pre>
  
  <p>I expected to load the login component only when I go to the <code>/auth/login</code> route, but it's also loading when I go to the <code>/login</code> route without redirecting.</p>
  
  <p>Here is the sample project on stackblitz : <a href="https://stackblitz.com/edit/angular-qor5kr" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-qor5kr</a></p>