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 { VideoMostLikedComponent } from './video-list/video-most-liked.component'
8 import { VideosComponent } from './videos.component'
9 import { VideoUserSubscriptionsComponent } from '@app/videos/video-list/video-user-subscriptions.component'
10 import { VideoOverviewComponent } from '@app/videos/video-list/video-overview.component'
12 const videosRoutes: Routes = [
15 component: VideosComponent,
16 canActivateChild: [ MetaGuard ],
20 component: VideoOverviewComponent,
23 title: 'Discover videos'
29 component: VideoTrendingComponent,
32 title: 'Trending videos'
36 key: 'trending-videos-list'
42 component: VideoMostLikedComponent,
45 title: 'Most liked videos'
49 key: 'most-liked-videos-list'
54 path: 'recently-added',
55 component: VideoRecentlyAddedComponent,
58 title: 'Recently added videos'
62 key: 'recently-added-videos-list'
67 path: 'subscriptions',
68 component: VideoUserSubscriptionsComponent,
71 title: 'Subscriptions'
75 key: 'subscription-videos-list'
81 component: VideoLocalComponent,
88 key: 'local-videos-list'
94 loadChildren: () => import('@app/videos/+video-edit/video-add.module').then(m => m.VideoAddModule),
97 title: 'Upload a video'
102 path: 'update/:uuid',
103 loadChildren: () => import('@app/videos/+video-edit/video-update.module').then(m => m.VideoUpdateModule),
106 title: 'Edit a video'
112 loadChildren: () => import('@app/videos/+video-watch/video-watch.module').then(m => m.VideoWatchModule),
122 imports: [ RouterModule.forChild(videosRoutes) ],
123 exports: [ RouterModule ]
125 export class VideosRoutingModule {}