]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-edit/video-add-routing.module.ts
Issue #195 : When uploading, warn when the user quits the page (#222)
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-edit / video-add-routing.module.ts
index e7a32627c50dd350ea55e223cbc4b6a65c9eab56..9541a2bd15dae7b4a4fdba2abe82e9bd0ba4d888 100644 (file)
@@ -4,13 +4,15 @@ import { RouterModule, Routes } from '@angular/router'
 import { MetaGuard } from '@ngx-meta/core'
 
 import { LoginGuard } from '../../core'
+import { CanDeactivateGuard } from '../../shared/can-deactivate-guard.service'
 import { VideoAddComponent } from './video-add.component'
 
 const videoAddRoutes: Routes = [
   {
     path: '',
     component: VideoAddComponent,
-    canActivate: [ MetaGuard, LoginGuard ]
+    canActivate: [ MetaGuard, LoginGuard ],
+    canDeactivate: [CanDeactivateGuard]
   }
 ]