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'
10 const videosRoutes: Routes = [
13 component: VideosComponent,
14 canActivateChild: [ MetaGuard ],
18 component: VideoTrendingComponent,
21 title: 'Trending videos'
26 path: 'recently-added',
27 component: VideoRecentlyAddedComponent,
30 title: 'Recently added videos'
35 path: 'subscriptions',
36 component: VideoUserSubscriptionsComponent,
39 title: 'Subscriptions'
45 component: VideoLocalComponent,
54 loadChildren: 'app/videos/+video-edit/video-add.module#VideoAddModule',
57 title: 'Upload a video'
63 loadChildren: 'app/videos/+video-edit/video-update.module#VideoUpdateModule',
71 path: 'watch/:uuid/comments/:commentId',
72 redirectTo: 'watch/:uuid'
76 loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule',
86 imports: [ RouterModule.forChild(videosRoutes) ],
87 exports: [ RouterModule ]
89 export class VideosRoutingModule {}