feat(routes): enable lazy loading for hotel components
This commit is contained in:
parent
8c96de6341
commit
0d936dab88
1 changed files with 8 additions and 4 deletions
|
@ -1,17 +1,21 @@
|
|||
import { Routes } from '@angular/router';
|
||||
import { HotelDetailsComponent } from './hotel-details/hotel-details.component';
|
||||
import { HotelListComponent } from './hotel-list/hotel-list.component';
|
||||
import { TestComponent } from './test/test.component';
|
||||
import { NewHotelComponent } from './new-hotel/new-hotel.component';
|
||||
|
||||
export const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: HotelListComponent,
|
||||
loadComponent: () =>
|
||||
import('./hotel-list/hotel-list.component').then(
|
||||
(c) => c.HotelListComponent,
|
||||
),
|
||||
},
|
||||
{
|
||||
path: 'hotels/:id',
|
||||
component: HotelDetailsComponent,
|
||||
loadComponent: () =>
|
||||
import('./hotel-details/hotel-details.component').then(
|
||||
(c) => c.HotelDetailsComponent,
|
||||
),
|
||||
},
|
||||
{
|
||||
path: 'testing',
|
||||
|
|
Loading…
Add table
Reference in a new issue