1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3 import { MetaGuard } from '@ngx-meta/core'
4 import { VideoSearchComponent } from './video-list'
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: VideoSearchComponent,
43 title: 'Search videos'
49 loadChildren: 'app/videos/+video-edit#VideoAddModule',
52 title: 'Upload a video'
58 loadChildren: 'app/videos/+video-edit#VideoUpdateModule',
68 redirectTo: 'watch/:uuid'
72 loadChildren: 'app/videos/+video-watch#VideoWatchModule',
82 imports: [ RouterModule.forChild(videosRoutes) ],
83 exports: [ RouterModule ]
85 export class VideosRoutingModule {}