]>
Commit | Line | Data |
---|---|---|
78f912ed C |
1 | import { NgModule } from '@angular/core' |
2 | import { RouterModule, Routes } from '@angular/router' | |
3 | import { MetaGuard } from '@ngx-meta/core' | |
4 | import { AboutComponent } from './about.component' | |
5 | import { AboutInstanceComponent } from '@app/+about/about-instance/about-instance.component' | |
6 | import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component' | |
a6dbbf03 | 7 | import { AboutFollowsComponent } from '@app/+about/about-follows/about-follows.component' |
b42f9c40 | 8 | import { AboutInstanceResolver } from '@app/+about/about-instance/about-instance.resolver' |
78f912ed C |
9 | |
10 | const aboutRoutes: Routes = [ | |
11 | { | |
12 | path: '', | |
13 | component: AboutComponent, | |
14 | canActivateChild: [ MetaGuard ], | |
15 | children: [ | |
16 | { | |
17 | path: '', | |
18 | redirectTo: 'instance', | |
19 | pathMatch: 'full' | |
20 | }, | |
21 | { | |
22 | path: 'instance', | |
23 | component: AboutInstanceComponent, | |
24 | data: { | |
25 | meta: { | |
26 | title: 'About this instance' | |
27 | } | |
b42f9c40 C |
28 | }, |
29 | resolve: { | |
30 | instanceData: AboutInstanceResolver | |
78f912ed C |
31 | } |
32 | }, | |
33 | { | |
34 | path: 'peertube', | |
35 | component: AboutPeertubeComponent, | |
36 | data: { | |
37 | meta: { | |
38 | title: 'About PeerTube' | |
39 | } | |
40 | } | |
a6dbbf03 C |
41 | }, |
42 | { | |
43 | path: 'follows', | |
44 | component: AboutFollowsComponent, | |
45 | data: { | |
46 | meta: { | |
47 | title: 'About follows' | |
48 | } | |
49 | } | |
78f912ed C |
50 | } |
51 | ] | |
52 | } | |
53 | ] | |
54 | ||
55 | @NgModule({ | |
56 | imports: [ RouterModule.forChild(aboutRoutes) ], | |
57 | exports: [ RouterModule ] | |
58 | }) | |
59 | export class AboutRoutingModule {} |