How to declare routes of feature module as children of another component?

Advertisements I am refactoring my Angular App. My app-routing.module.ts has two main routes: const routes: Routes = [ {path: "login", component: LoginComponent, canActivate: [IsNotLoggedGuard]}, {path: "", component: MainComponent, canActivate: [AuthGuard],children: [ {path: "orders", component: OrderComponent, children:[…] ]}, ]; Now, I created a routing module for the newly created OrderModule // in order-routing.module.ts const routes =… Read More How to declare routes of feature module as children of another component?

Angular import modules on parent of per nested component

Advertisements Using Angular 12, We have hotel component, and a hotel module -> this imports all the required components and modules for a hotel. Within the hotel component.html, we loop through all the rooms and display a ‘hotel-room.component’. Is it best practice (or performance issues?) to have a child ‘hotel-room.module’, and import only the required… Read More Angular import modules on parent of per nested component