1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3 import { MetaGuard } from '@ngx-meta/core'
4 import { MyVideosComponent } 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: MyVideosComponent,
31 component: VideoTrendingComponent,
34 title: 'Trending videos'
39 path: 'recently-added',
40 component: VideoRecentlyAddedComponent,
43 title: 'Recently added videos'
49 loadChildren: 'app/videos/+video-edit#VideoAddModule',
52 title: 'Upload a video'
58 loadChildren: 'app/videos/+video-edit#VideoUpdateModule',
67 redirectTo: 'watch/:uuid'
71 loadChildren: 'app/videos/+video-watch#VideoWatchModule',
81 imports: [ RouterModule.forChild(videosRoutes) ],
82 exports: [ RouterModule ]
84 export class VideosRoutingModule {}