]>
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' |
78f912ed C |
8 | |
9 | const aboutRoutes: Routes = [ | |
10 | { | |
11 | path: '', | |
12 | component: AboutComponent, | |
13 | canActivateChild: [ MetaGuard ], | |
14 | children: [ | |
15 | { | |
16 | path: '', | |
17 | redirectTo: 'instance', | |
18 | pathMatch: 'full' | |
19 | }, | |
20 | { | |
21 | path: 'instance', | |
22 | component: AboutInstanceComponent, | |
23 | data: { | |
24 | meta: { | |
25 | title: 'About this instance' | |
26 | } | |
27 | } | |
28 | }, | |
29 | { | |
30 | path: 'peertube', | |
31 | component: AboutPeertubeComponent, | |
32 | data: { | |
33 | meta: { | |
34 | title: 'About PeerTube' | |
35 | } | |
36 | } | |
a6dbbf03 C |
37 | }, |
38 | { | |
39 | path: 'follows', | |
40 | component: AboutFollowsComponent, | |
41 | data: { | |
42 | meta: { | |
43 | title: 'About follows' | |
44 | } | |
45 | } | |
78f912ed C |
46 | } |
47 | ] | |
48 | } | |
49 | ] | |
50 | ||
51 | @NgModule({ | |
52 | imports: [ RouterModule.forChild(aboutRoutes) ], | |
53 | exports: [ RouterModule ] | |
54 | }) | |
55 | export class AboutRoutingModule {} |