]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/app-routing.module.ts
Merge branch 'release/2.1.0' into develop
[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',
f36da21e 11 loadChildren: () => import('./+admin/admin.module').then(m => m.AdminModule)
4b4f22fc
C
12 },
13 {
14 path: 'my-account',
f36da21e 15 loadChildren: () => import('./+my-account/my-account.module').then(m => m.MyAccountModule)
4b4f22fc 16 },
d9eaee39
JM
17 {
18 path: 'verify-account',
f36da21e 19 loadChildren: () => import('./+signup/+verify-account/verify-account.module').then(m => m.VerifyAccountModule)
d9eaee39 20 },
4b4f22fc
C
21 {
22 path: 'accounts',
f36da21e 23 loadChildren: () => import('./+accounts/accounts.module').then(m => m.AccountsModule)
4b4f22fc
C
24 },
25 {
26 path: 'video-channels',
f36da21e 27 loadChildren: () => import('./+video-channels/video-channels.module').then(m => m.VideoChannelsModule)
a51bad1a 28 },
78f912ed
C
29 {
30 path: 'about',
f36da21e 31 loadChildren: () => import('./+about/about.module').then(m => m.AboutModule)
78f912ed 32 },
b247a132
C
33 {
34 path: 'signup',
f36da21e 35 loadChildren: () => import('./+signup/+register/register.module').then(m => m.RegisterModule)
b247a132 36 },
b889cdb2
C
37 {
38 path: '',
39 component: AppComponent // Avoid 404, app component will redirect dynamically
40 },
a51bad1a
C
41 {
42 path: '**',
f36da21e 43 loadChildren: () => import('./+page-not-found/page-not-found.module').then(m => m.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 {}