]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/+video-watch/video-watch-routing.module.ts
Reorganize client shared modules
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / video-watch-routing.module.ts
1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3 import { MetaGuard } from '@ngx-meta/core'
4 import { VideoWatchComponent } from './video-watch.component'
5
6 const videoWatchRoutes: Routes = [
7 {
8 path: 'playlist/:playlistId',
9 component: VideoWatchComponent,
10 canActivate: [ MetaGuard ]
11 },
12 {
13 path: ':videoId/comments/:commentId',
14 redirectTo: ':videoId'
15 },
16 {
17 path: ':videoId',
18 component: VideoWatchComponent,
19 canActivate: [ MetaGuard ]
20 }
21 ]
22
23 @NgModule({
24 imports: [ RouterModule.forChild(videoWatchRoutes) ],
25 exports: [ RouterModule ]
26 })
27 export class VideoWatchRoutingModule {}