]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/app-routing.module.ts
Handle email update on server
[github/Chocobozzz/PeerTube.git] / client / src / app / app-routing.module.ts
CommitLineData
df98563e 1import { NgModule } from '@angular/core'
489290b8 2import { RouteReuseStrategy, RouterModule, Routes } from '@angular/router'
a685e25c
C
3
4import { PreloadSelectedModulesList } from './core'
b889cdb2 5import { AppComponent } from '@app/app.component'
489290b8 6import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy'
693b1aba
C
7
8const routes: Routes = [
4b4f22fc
C
9 {
10 path: 'admin',
11 loadChildren: './+admin/admin.module#AdminModule'
12 },
13 {
14 path: 'my-account',
15 loadChildren: './+my-account/my-account.module#MyAccountModule'
16 },
d9eaee39
JM
17 {
18 path: 'verify-account',
b247a132 19 loadChildren: './+signup/+verify-account/verify-account.module#VerifyAccountModule'
d9eaee39 20 },
4b4f22fc
C
21 {
22 path: 'accounts',
23 loadChildren: './+accounts/accounts.module#AccountsModule'
24 },
25 {
26 path: 'video-channels',
27 loadChildren: './+video-channels/video-channels.module#VideoChannelsModule'
a51bad1a 28 },
78f912ed
C
29 {
30 path: 'about',
31 loadChildren: './+about/about.module#AboutModule'
32 },
b247a132
C
33 {
34 path: 'signup',
35 loadChildren: './+signup/+register/register.module#RegisterModule'
36 },
b889cdb2
C
37 {
38 path: '',
39 component: AppComponent // Avoid 404, app component will redirect dynamically
40 },
a51bad1a
C
41 {
42 path: '**',
43 loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule'
4b4f22fc 44 }
df98563e 45]
693b1aba
C
46
47@NgModule({
04de542a
C
48 imports: [
49 RouterModule.forRoot(routes, {
50 useHash: Boolean(history.pushState) === false,
489290b8 51 scrollPositionRestoration: 'disabled',
07a98236 52 preloadingStrategy: PreloadSelectedModulesList,
489290b8 53 anchorScrolling: 'disabled'
04de542a
C
54 })
55 ],
901637bb 56 providers: [
489290b8
C
57 PreloadSelectedModulesList,
58 { provide: RouteReuseStrategy, useClass: CustomReuseStrategy }
901637bb 59 ],
693b1aba
C
60 exports: [ RouterModule ]
61})
62export class AppRoutingModule {}