]>
Commit | Line | Data |
---|---|---|
0626e7af C |
1 | import { NgModule } from '@angular/core' |
2 | import { RouterModule, Routes } from '@angular/router' | |
3 | import { MetaGuard } from '@ngx-meta/core' | |
170726f5 | 4 | import { AccountsComponent } from './accounts.component' |
0626e7af | 5 | import { AccountVideosComponent } from './account-videos/account-videos.component' |
d3e91a5f C |
6 | import { AccountAboutComponent } from './account-about/account-about.component' |
7 | import { AccountVideoChannelsComponent } from './account-video-channels/account-video-channels.component' | |
0626e7af | 8 | |
170726f5 | 9 | const accountsRoutes: Routes = [ |
0626e7af C |
10 | { |
11 | path: ':accountId', | |
170726f5 | 12 | component: AccountsComponent, |
0626e7af C |
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 | }, | |
d3e91a5f C |
29 | { |
30 | path: 'video-channels', | |
31 | component: AccountVideoChannelsComponent, | |
32 | data: { | |
33 | meta: { | |
34 | title: 'Account video channels' | |
35 | } | |
36 | } | |
37 | }, | |
0626e7af C |
38 | { |
39 | path: 'about', | |
40 | component: AccountAboutComponent, | |
41 | data: { | |
42 | meta: { | |
43 | title: 'About account' | |
44 | } | |
45 | } | |
46 | } | |
47 | ] | |
48 | } | |
49 | ] | |
50 | ||
51 | @NgModule({ | |
170726f5 | 52 | imports: [ RouterModule.forChild(accountsRoutes) ], |
0626e7af C |
53 | exports: [ RouterModule ] |
54 | }) | |
170726f5 | 55 | export class AccountsRoutingModule {} |