title: Angular 5: conditional module lazy loading
body: <p>I'm encountering an issue while trying to lazy load module according to the user profile,
  I defined three default paths (with empty path for each route) and each user has access to a specific module,
  i'm using a guards in order to detemine the current user profile (actually i'm toggling manually to set the default loaded module by setting <strong>const canGo =true</strong>)</p>
  
  <p>The expected behavior is that the actual routing configuration should activate the adequate route according to the profile but that's not the case.</p>
  
  <pre><code>export const routes: Routes = [
    {
      path: '',
      loadChildren: 'app/user/user.module#UserModule',
      canActivate: [
        CanActivateUserModuleGuard
      ],
    },
    {
      path: '',
      loadChildren: 'app/admin/admin.module#AdminModule',
      canActivate: [
        CanActivateAdminModuleGuard
      ]
    },
    {
      path: '',
      loadChildren: 'app/moderator/moderator.module#ModeratorModule',
      canActivate: [
        CanActivateModeratorModuleGuard
      ]
    },
    {
      path: '404',
      component: NotFoundComponent
    }
  ];
  </code></pre>
  
  <p>NB:
  below the online issue if interested
  <a href="https://stackblitz.com/edit/angular-vd4oyu?file=app%2Fapp-routing.module.ts" rel="noreferrer">https://stackblitz.com/edit/angular-vd4oyu?file=app%2Fapp-routing.module.ts</a></p>
  
  <p>What is the best way to accomplish this requirement?</p>