diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-25 16:56:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-25 16:56:13 +0200 |
commit | 170726f523ff48f89da45473fc53ca54784f43dd (patch) | |
tree | f9f783ebdfc934c6831396c2bf33f658d6640583 /client/src/app/+accounts/accounts-routing.module.ts | |
parent | cc918ac3f45e32f031cce7b6e0473e5c2c34b8ae (diff) | |
download | PeerTube-170726f523ff48f89da45473fc53ca54784f43dd.tar.gz PeerTube-170726f523ff48f89da45473fc53ca54784f43dd.tar.zst PeerTube-170726f523ff48f89da45473fc53ca54784f43dd.zip |
Implement video channel views
Diffstat (limited to 'client/src/app/+accounts/accounts-routing.module.ts')
-rw-r--r-- | client/src/app/+accounts/accounts-routing.module.ts | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/client/src/app/+accounts/accounts-routing.module.ts b/client/src/app/+accounts/accounts-routing.module.ts new file mode 100644 index 000000000..ffe606b43 --- /dev/null +++ b/client/src/app/+accounts/accounts-routing.module.ts | |||
@@ -0,0 +1,55 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | import { RouterModule, Routes } from '@angular/router' | ||
3 | import { MetaGuard } from '@ngx-meta/core' | ||
4 | import { AccountsComponent } from './accounts.component' | ||
5 | import { AccountVideosComponent } from './account-videos/account-videos.component' | ||
6 | import { AccountAboutComponent } from './account-about/account-about.component' | ||
7 | import { AccountVideoChannelsComponent } from './account-video-channels/account-video-channels.component' | ||
8 | |||
9 | const accountsRoutes: Routes = [ | ||
10 | { | ||
11 | path: ':accountId', | ||
12 | component: AccountsComponent, | ||
13 | canActivateChild: [ MetaGuard ], | ||
14 | children: [ | ||
15 | { | ||
16 | path: '', | ||
17 | redirectTo: 'videos', | ||
18 | pathMatch: 'full' | ||
19 | }, | ||
20 | { | ||
21 | path: 'videos', | ||
22 | component: AccountVideosComponent, | ||
23 | data: { | ||
24 | meta: { | ||
25 | title: 'Account videos' | ||
26 | } | ||
27 | } | ||
28 | }, | ||
29 | { | ||
30 | path: 'video-channels', | ||
31 | component: AccountVideoChannelsComponent, | ||
32 | data: { | ||
33 | meta: { | ||
34 | title: 'Account video channels' | ||
35 | } | ||
36 | } | ||
37 | }, | ||
38 | { | ||
39 | path: 'about', | ||
40 | component: AccountAboutComponent, | ||
41 | data: { | ||
42 | meta: { | ||
43 | title: 'About account' | ||
44 | } | ||
45 | } | ||
46 | } | ||
47 | ] | ||
48 | } | ||
49 | ] | ||
50 | |||
51 | @NgModule({ | ||
52 | imports: [ RouterModule.forChild(accountsRoutes) ], | ||
53 | exports: [ RouterModule ] | ||
54 | }) | ||
55 | export class AccountsRoutingModule {} | ||