File size: 402 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import type { Route } from '@angular/router'

// loadComponent lazily loads the component
// when the component is the default export, there is no need to handle the promise

export const routes: Array<Route> = [
  {
    path: '',
    loadComponent: () => import('./components/posts.component'),
  },
  {
    path: 'post/:postId',
    loadComponent: () => import('./components/post.component'),
  },
]