diff options
Diffstat (limited to 'client/src/app/app-routing.module.ts')
-rw-r--r-- | client/src/app/app-routing.module.ts | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index 57e485e8e..4e3cce590 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts | |||
@@ -3,7 +3,7 @@ import { RouteReuseStrategy, RouterModule, Routes } from '@angular/router' | |||
3 | import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy' | 3 | import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy' |
4 | import { MenuGuards } from '@app/core/routing/menu-guard.service' | 4 | import { MenuGuards } from '@app/core/routing/menu-guard.service' |
5 | import { POSSIBLE_LOCALES } from '@shared/core-utils/i18n' | 5 | import { POSSIBLE_LOCALES } from '@shared/core-utils/i18n' |
6 | import { PreloadSelectedModulesList } from './core' | 6 | import { MetaGuard, PreloadSelectedModulesList } from './core' |
7 | import { EmptyComponent } from './empty.component' | 7 | import { EmptyComponent } from './empty.component' |
8 | 8 | ||
9 | const routes: Routes = [ | 9 | const routes: Routes = [ |
@@ -11,7 +11,8 @@ const routes: Routes = [ | |||
11 | path: 'admin', | 11 | path: 'admin', |
12 | canActivate: [ MenuGuards.close() ], | 12 | canActivate: [ MenuGuards.close() ], |
13 | canDeactivate: [ MenuGuards.open() ], | 13 | canDeactivate: [ MenuGuards.open() ], |
14 | loadChildren: () => import('./+admin/admin.module').then(m => m.AdminModule) | 14 | loadChildren: () => import('./+admin/admin.module').then(m => m.AdminModule), |
15 | canActivateChild: [ MetaGuard ] | ||
15 | }, | 16 | }, |
16 | { | 17 | { |
17 | path: 'home', | 18 | path: 'home', |
@@ -19,51 +20,63 @@ const routes: Routes = [ | |||
19 | }, | 20 | }, |
20 | { | 21 | { |
21 | path: 'my-account', | 22 | path: 'my-account', |
22 | loadChildren: () => import('./+my-account/my-account.module').then(m => m.MyAccountModule) | 23 | loadChildren: () => import('./+my-account/my-account.module').then(m => m.MyAccountModule), |
24 | canActivateChild: [ MetaGuard ] | ||
23 | }, | 25 | }, |
24 | { | 26 | { |
25 | path: 'my-library', | 27 | path: 'my-library', |
26 | loadChildren: () => import('./+my-library/my-library.module').then(m => m.MyLibraryModule) | 28 | loadChildren: () => import('./+my-library/my-library.module').then(m => m.MyLibraryModule), |
29 | canActivateChild: [ MetaGuard ] | ||
27 | }, | 30 | }, |
28 | { | 31 | { |
29 | path: 'verify-account', | 32 | path: 'verify-account', |
30 | loadChildren: () => import('./+signup/+verify-account/verify-account.module').then(m => m.VerifyAccountModule) | 33 | loadChildren: () => import('./+signup/+verify-account/verify-account.module').then(m => m.VerifyAccountModule), |
34 | canActivateChild: [ MetaGuard ] | ||
31 | }, | 35 | }, |
32 | { | 36 | { |
33 | path: 'accounts', | 37 | path: 'accounts', |
34 | loadChildren: () => import('./+accounts/accounts.module').then(m => m.AccountsModule) | 38 | loadChildren: () => import('./+accounts/accounts.module').then(m => m.AccountsModule), |
39 | canActivateChild: [ MetaGuard ] | ||
35 | }, | 40 | }, |
36 | { | 41 | { |
37 | path: 'video-channels', | 42 | path: 'video-channels', |
38 | loadChildren: () => import('./+video-channels/video-channels.module').then(m => m.VideoChannelsModule) | 43 | loadChildren: () => import('./+video-channels/video-channels.module').then(m => m.VideoChannelsModule), |
44 | canActivateChild: [ MetaGuard ] | ||
39 | }, | 45 | }, |
40 | { | 46 | { |
41 | path: 'about', | 47 | path: 'about', |
42 | loadChildren: () => import('./+about/about.module').then(m => m.AboutModule) | 48 | loadChildren: () => import('./+about/about.module').then(m => m.AboutModule), |
49 | canActivateChild: [ MetaGuard ] | ||
43 | }, | 50 | }, |
44 | { | 51 | { |
45 | path: 'signup', | 52 | path: 'signup', |
46 | loadChildren: () => import('./+signup/+register/register.module').then(m => m.RegisterModule) | 53 | loadChildren: () => import('./+signup/+register/register.module').then(m => m.RegisterModule), |
54 | canActivateChild: [ MetaGuard ] | ||
47 | }, | 55 | }, |
48 | { | 56 | { |
49 | path: 'reset-password', | 57 | path: 'reset-password', |
50 | loadChildren: () => import('./+reset-password/reset-password.module').then(m => m.ResetPasswordModule) | 58 | loadChildren: () => import('./+reset-password/reset-password.module').then(m => m.ResetPasswordModule), |
59 | canActivateChild: [ MetaGuard ] | ||
51 | }, | 60 | }, |
52 | { | 61 | { |
53 | path: 'login', | 62 | path: 'login', |
54 | loadChildren: () => import('./+login/login.module').then(m => m.LoginModule) | 63 | loadChildren: () => import('./+login/login.module').then(m => m.LoginModule), |
64 | canActivateChild: [ MetaGuard ] | ||
55 | }, | 65 | }, |
56 | { | 66 | { |
57 | path: 'search', | 67 | path: 'search', |
58 | loadChildren: () => import('./+search/search.module').then(m => m.SearchModule) | 68 | loadChildren: () => import('./+search/search.module').then(m => m.SearchModule), |
69 | canActivateChild: [ MetaGuard ] | ||
59 | }, | 70 | }, |
60 | { | 71 | { |
61 | path: 'videos', | 72 | path: 'videos', |
62 | loadChildren: () => import('./+videos/videos.module').then(m => m.VideosModule) | 73 | loadChildren: () => import('./+videos/videos.module').then(m => m.VideosModule), |
74 | canActivateChild: [ MetaGuard ] | ||
63 | }, | 75 | }, |
64 | { | 76 | { |
65 | path: 'remote-interaction', | 77 | path: 'remote-interaction', |
66 | loadChildren: () => import('./+remote-interaction/remote-interaction.module').then(m => m.RemoteInteractionModule) | 78 | loadChildren: () => import('./+remote-interaction/remote-interaction.module').then(m => m.RemoteInteractionModule), |
79 | canActivateChild: [ MetaGuard ] | ||
67 | }, | 80 | }, |
68 | { | 81 | { |
69 | path: 'video-playlists/watch', | 82 | path: 'video-playlists/watch', |