]>
Commit | Line | Data |
---|---|---|
693b1aba C |
1 | import { NgModule } from '@angular/core'; |
2 | import { RouterModule, Routes } from '@angular/router'; | |
0629423c | 3 | |
d8e689b8 | 4 | import { VideoAddComponent, VideoUpdateComponent } from './video-edit'; |
0629423c C |
5 | import { VideoListComponent } from './video-list'; |
6 | import { VideosComponent } from './videos.component'; | |
7 | import { VideoWatchComponent } from './video-watch'; | |
8 | ||
693b1aba | 9 | const videosRoutes: Routes = [ |
0629423c C |
10 | { |
11 | path: 'videos', | |
12 | component: VideosComponent, | |
13 | children: [ | |
14 | { | |
15 | path: 'list', | |
b58c69a1 C |
16 | component: VideoListComponent, |
17 | data: { | |
18 | meta: { | |
55b33946 | 19 | title: 'Videos list' |
b58c69a1 C |
20 | } |
21 | } | |
0629423c C |
22 | }, |
23 | { | |
24 | path: 'add', | |
b58c69a1 C |
25 | component: VideoAddComponent, |
26 | data: { | |
27 | meta: { | |
55b33946 | 28 | title: 'Add a video' |
b58c69a1 C |
29 | } |
30 | } | |
0629423c | 31 | }, |
d8e689b8 C |
32 | { |
33 | path: 'edit/:id', | |
34 | component: VideoUpdateComponent, | |
35 | data: { | |
36 | meta: { | |
37 | title: 'Edit a video' | |
38 | } | |
39 | } | |
40 | }, | |
da19d94b C |
41 | { |
42 | path: ':id', | |
43 | redirectTo: 'watch/:id' | |
44 | }, | |
0629423c C |
45 | { |
46 | path: 'watch/:id', | |
47 | component: VideoWatchComponent | |
48 | } | |
49 | ] | |
50 | } | |
51 | ]; | |
693b1aba C |
52 | |
53 | @NgModule({ | |
54 | imports: [ RouterModule.forChild(videosRoutes) ], | |
55 | exports: [ RouterModule ] | |
56 | }) | |
57 | export class VideosRoutingModule {} |