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'
9 const videosRoutes: Routes = [
12 component: VideosComponent,
13 canActivateChild: [ MetaGuard ],
18 redirectTo: 'recently-added'
22 component: VideoTrendingComponent,
25 title: 'Trending videos'
30 path: 'recently-added',
31 component: VideoRecentlyAddedComponent,
34 title: 'Recently added videos'
40 component: VideoLocalComponent,
49 loadChildren: 'app/videos/+video-edit/video-add.module#VideoAddModule',
52 title: 'Upload a video'
58 loadChildren: 'app/videos/+video-edit/video-update.module#VideoUpdateModule',
66 path: 'watch/:uuid/comments/:commentId',
67 redirectTo: 'watch/:uuid'
71 loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule',
81 imports: [ RouterModule.forChild(videosRoutes) ],
82 exports: [ RouterModule ]
84 export class VideosRoutingModule {}