]>
Commit | Line | Data |
---|---|---|
1 | import { NgModule } from '@angular/core' | |
2 | import { RouterModule, Routes } from '@angular/router' | |
3 | ||
4 | import { MetaGuard } from '@ngx-meta/core' | |
5 | ||
6 | import { VideoWatchComponent } from './video-watch.component' | |
7 | ||
8 | const videoWatchRoutes: Routes = [ | |
9 | { | |
10 | path: 'playlist/:playlistId', | |
11 | component: VideoWatchComponent, | |
12 | canActivate: [ MetaGuard ] | |
13 | }, | |
14 | { | |
15 | path: ':videoId/comments/:commentId', | |
16 | redirectTo: ':videoId' | |
17 | }, | |
18 | { | |
19 | path: ':videoId', | |
20 | component: VideoWatchComponent, | |
21 | canActivate: [ MetaGuard ] | |
22 | } | |
23 | ] | |
24 | ||
25 | @NgModule({ | |
26 | imports: [ RouterModule.forChild(videoWatchRoutes) ], | |
27 | exports: [ RouterModule ] | |
28 | }) | |
29 | export class VideoWatchRoutingModule {} |