Open History to see the last commit
1import type { Route } from '@angular/router'
2β
3// loadComponent lazily loads the component
4// when the component is the default export, there is no need to handle the promise
5β
6export const routes: Array<Route> = [
7 {
8 path: '',
9 loadComponent: () => import('./components/posts.component'),
10 },
11 {
12 path: 'post/:postId',
13 loadComponent: () => import('./components/post.component'),
14 },
15]