1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3 import { VideoLocalComponent } from '@app/videos/video-list/video-local.component'
4 import { MetaGuard } from '@ngx-meta/core'
5 import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
6 import { VideoTrendingComponent } from './video-list/video-trending.component'
7 import { VideosComponent } from './videos.component'
8 import { VideoUserSubscriptionsComponent } from '@app/videos/video-list/video-user-subscriptions.component'
9 import { VideoOverviewComponent } from '@app/videos/video-list/video-overview.component'
11 const videosRoutes: Routes = [
14 component: VideosComponent,
15 canActivateChild: [ MetaGuard ],
19 component: VideoOverviewComponent,
22 title: 'Videos overview'
28 component: VideoTrendingComponent,
31 title: 'Trending videos'
35 key: 'trending-videos-list'
40 path: 'recently-added',
41 component: VideoRecentlyAddedComponent,
44 title: 'Recently added videos'
48 key: 'recently-added-videos-list'
53 path: 'subscriptions',
54 component: VideoUserSubscriptionsComponent,
57 title: 'Subscriptions'
61 key: 'subscription-videos-list'
67 component: VideoLocalComponent,
74 key: 'local-videos-list'
80 loadChildren: 'app/videos/+video-edit/video-add.module#VideoAddModule',
83 title: 'Upload a video'
89 loadChildren: 'app/videos/+video-edit/video-update.module#VideoUpdateModule',
98 loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule',
108 imports: [ RouterModule.forChild(videosRoutes) ],
109 exports: [ RouterModule ]
111 export class VideosRoutingModule {}