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 { VideoSearchComponent } from './video-list'
6 import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
7 import { VideoTrendingComponent } from './video-list/video-trending.component'
8 import { VideosComponent } from './videos.component'
10 const videosRoutes: Routes = [
13 component: VideosComponent,
14 canActivateChild: [ MetaGuard ],
19 redirectTo: 'recently-added'
23 component: VideoTrendingComponent,
26 title: 'Trending videos'
31 path: 'recently-added',
32 component: VideoRecentlyAddedComponent,
35 title: 'Recently added videos'
41 component: VideoLocalComponent,
50 component: VideoSearchComponent,
53 title: 'Search videos'
59 loadChildren: 'app/videos/+video-edit/video-add.module#VideoAddModule',
62 title: 'Upload a video'
68 loadChildren: 'app/videos/+video-edit/video-update.module#VideoUpdateModule',
78 redirectTo: 'watch/:uuid'
82 loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule',
92 imports: [ RouterModule.forChild(videosRoutes) ],
93 exports: [ RouterModule ]
95 export class VideosRoutingModule {}