Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

app.routes.ts

15 lines402 Bytes

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 },