How can I define a parent route from a child component after lazy loading?
For example:
app-routing.module.ts
const routes: Routes = [
{ path: '', component: HomeComponent },
{ path: 'login', loadChildren: () => import('./user/user.module').then(m => m.UserModule) }
];
user-routing.module.ts
const routes: Routes = [
{ path: '', component: LoginComponent },
{ path: '../register', component: RegisterComponent },
{ path: '../reset', component: ResetPasswordComponent },
{ path: '../verify', component: VerifyComponent, canActivate: [AuthGuard] }
];
Obviously the "../" does not work, but I want the paths "/register", "/reset", and "/verify"... to be root paths. However, I would like to still lazy load the user module so that everything loads at once, I just don't want my router to be in another folder or child route like "/user" or "/login".