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'
36 path: 'recently-added',
37 component: VideoRecentlyAddedComponent,
40 title: 'Recently added videos'
45 path: 'subscriptions',
46 component: VideoUserSubscriptionsComponent,
49 title: 'Subscriptions'
55 component: VideoLocalComponent,
64 loadChildren: 'app/videos/+video-edit/video-add.module#VideoAddModule',
67 title: 'Upload a video'
73 loadChildren: 'app/videos/+video-edit/video-update.module#VideoUpdateModule',
81 path: 'watch/:uuid/comments/:commentId',
82 redirectTo: 'watch/:uuid'
86 loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule',
96 imports: [ RouterModule.forChild(videosRoutes) ],
97 exports: [ RouterModule ]
99 export class VideosRoutingModule {}