Download react-query/examples/angular/router/src/app/app.routes.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 402 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/examples/angular/router/src/app/app.routes.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/examples/angular/router/src/app/app.routes.ts
-
curl -L -o app.routes.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/examples/angular/router/src/app/app.routes.ts
402 Bytes
| 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'), | |
| }, | |
| ] | |