]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/app-routing.module.ts
Multi step registration
[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',
19 loadChildren: './+verify-account/verify-account.module#VerifyAccountModule'
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 },
b889cdb2
C
33 {
34 path: '',
35 component: AppComponent // Avoid 404, app component will redirect dynamically
36 },
a51bad1a
C
37 {
38 path: '**',
39 loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule'
4b4f22fc 40 }
df98563e 41]
693b1aba
C
42
43@NgModule({
04de542a
C
44 imports: [
45 RouterModule.forRoot(routes, {
46 useHash: Boolean(history.pushState) === false,
489290b8 47 scrollPositionRestoration: 'disabled',
07a98236 48 preloadingStrategy: PreloadSelectedModulesList,
489290b8 49 anchorScrolling: 'disabled'
04de542a
C
50 })
51 ],
901637bb 52 providers: [
489290b8
C
53 PreloadSelectedModulesList,
54 { provide: RouteReuseStrategy, useClass: CustomReuseStrategy }
901637bb 55 ],
693b1aba
C
56 exports: [ RouterModule ]
57})
58export class AppRoutingModule {}