about-routing.module.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import { NgModule } from '@angular/core'
  2. import { RouterModule, Routes } from '@angular/router'
  3. import { AboutFollowsComponent } from '@app/+about/about-follows/about-follows.component'
  4. import { AboutInstanceComponent } from '@app/+about/about-instance/about-instance.component'
  5. import { AboutInstanceResolver } from '@app/+about/about-instance/about-instance.resolver'
  6. import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component'
  7. import { AboutComponent } from './about.component'
  8. const aboutRoutes: Routes = [
  9. {
  10. path: '',
  11. component: AboutComponent,
  12. children: [
  13. {
  14. path: '',
  15. redirectTo: 'instance',
  16. pathMatch: 'full'
  17. },
  18. {
  19. path: 'instance',
  20. component: AboutInstanceComponent,
  21. data: {
  22. meta: {
  23. title: $localize`About this instance`
  24. }
  25. },
  26. resolve: {
  27. instanceData: AboutInstanceResolver
  28. }
  29. },
  30. {
  31. path: 'contact',
  32. component: AboutInstanceComponent,
  33. data: {
  34. meta: {
  35. title: $localize`Contact`
  36. },
  37. isContact: true
  38. },
  39. resolve: {
  40. instanceData: AboutInstanceResolver
  41. }
  42. },
  43. {
  44. path: 'peertube',
  45. component: AboutPeertubeComponent,
  46. data: {
  47. meta: {
  48. title: $localize`About PeerTube`
  49. }
  50. }
  51. },
  52. {
  53. path: 'follows',
  54. component: AboutFollowsComponent,
  55. data: {
  56. meta: {
  57. title: $localize`About this instance's network`
  58. }
  59. }
  60. }
  61. ]
  62. }
  63. ]
  64. @NgModule({
  65. imports: [ RouterModule.forChild(aboutRoutes) ],
  66. exports: [ RouterModule ]
  67. })
  68. export class AboutRoutingModule {}