1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3 import { MetaGuard } from '@ngx-meta/core'
4 import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
5 import { VideoTrendingComponent } from './video-list/video-trending.component'
6 import { VideosComponent } from './videos.component'
8 const videosRoutes: Routes = [
11 component: VideosComponent,
12 canActivateChild: [ MetaGuard ],
17 redirectTo: 'recently-added'
21 component: VideoTrendingComponent,
24 title: 'Trending videos'
29 path: 'recently-added',
30 component: VideoRecentlyAddedComponent,
33 title: 'Recently added videos'
39 loadChildren: 'app/videos/+video-edit#VideoAddModule',
42 title: 'Upload a video'
48 loadChildren: 'app/videos/+video-edit#VideoUpdateModule',
57 redirectTo: 'watch/:uuid'
61 loadChildren: 'app/videos/+video-watch#VideoWatchModule',
71 imports: [ RouterModule.forChild(videosRoutes) ],
72 exports: [ RouterModule ]
74 export class VideosRoutingModule {}