2016-11-20 16:18:15 +00:00
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { RouterModule, Routes } from '@angular/router';
|
2016-07-08 15:15:14 +00:00
|
|
|
|
2017-04-10 19:15:28 +00:00
|
|
|
import { VideoAddComponent, VideoUpdateComponent } from './video-edit';
|
2016-07-08 15:15:14 +00:00
|
|
|
import { VideoListComponent } from './video-list';
|
|
|
|
import { VideosComponent } from './videos.component';
|
|
|
|
import { VideoWatchComponent } from './video-watch';
|
|
|
|
|
2016-11-20 16:18:15 +00:00
|
|
|
const videosRoutes: Routes = [
|
2016-07-08 15:15:14 +00:00
|
|
|
{
|
|
|
|
path: 'videos',
|
|
|
|
component: VideosComponent,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: 'list',
|
2016-11-04 16:25:26 +00:00
|
|
|
component: VideoListComponent,
|
|
|
|
data: {
|
|
|
|
meta: {
|
2017-03-12 17:40:05 +00:00
|
|
|
title: 'Videos list'
|
2016-11-04 16:25:26 +00:00
|
|
|
}
|
|
|
|
}
|
2016-07-08 15:15:14 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'add',
|
2016-11-04 16:25:26 +00:00
|
|
|
component: VideoAddComponent,
|
|
|
|
data: {
|
|
|
|
meta: {
|
2017-03-12 17:40:05 +00:00
|
|
|
title: 'Add a video'
|
2016-11-04 16:25:26 +00:00
|
|
|
}
|
|
|
|
}
|
2016-07-08 15:15:14 +00:00
|
|
|
},
|
2017-04-10 19:15:28 +00:00
|
|
|
{
|
|
|
|
path: 'edit/:id',
|
|
|
|
component: VideoUpdateComponent,
|
|
|
|
data: {
|
|
|
|
meta: {
|
|
|
|
title: 'Edit a video'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2016-11-29 20:57:19 +00:00
|
|
|
{
|
|
|
|
path: ':id',
|
|
|
|
redirectTo: 'watch/:id'
|
|
|
|
},
|
2016-07-08 15:15:14 +00:00
|
|
|
{
|
|
|
|
path: 'watch/:id',
|
|
|
|
component: VideoWatchComponent
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
];
|
2016-11-20 16:18:15 +00:00
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [ RouterModule.forChild(videosRoutes) ],
|
|
|
|
exports: [ RouterModule ]
|
|
|
|
})
|
|
|
|
export class VideosRoutingModule {}
|