]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/app-routing.module.ts
Display table next/prev/first/last icons
[github/Chocobozzz/PeerTube.git] / client / src / app / app-routing.module.ts
CommitLineData
df98563e 1import { NgModule } from '@angular/core'
ae5a3dd6 2import { RouterModule, Routes } from '@angular/router'
a685e25c
C
3
4import { PreloadSelectedModulesList } from './core'
b889cdb2 5import { AppComponent } from '@app/app.component'
693b1aba
C
6
7const routes: Routes = [
4b4f22fc
C
8 {
9 path: 'admin',
10 loadChildren: './+admin/admin.module#AdminModule'
11 },
12 {
13 path: 'my-account',
14 loadChildren: './+my-account/my-account.module#MyAccountModule'
15 },
16 {
17 path: 'accounts',
18 loadChildren: './+accounts/accounts.module#AccountsModule'
19 },
20 {
21 path: 'video-channels',
22 loadChildren: './+video-channels/video-channels.module#VideoChannelsModule'
a51bad1a 23 },
78f912ed
C
24 {
25 path: 'about',
26 loadChildren: './+about/about.module#AboutModule'
27 },
b889cdb2
C
28 {
29 path: '',
30 component: AppComponent // Avoid 404, app component will redirect dynamically
31 },
a51bad1a
C
32 {
33 path: '**',
34 loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule'
4b4f22fc 35 }
df98563e 36]
693b1aba
C
37
38@NgModule({
04de542a
C
39 imports: [
40 RouterModule.forRoot(routes, {
41 useHash: Boolean(history.pushState) === false,
a685e25c 42 preloadingStrategy: PreloadSelectedModulesList
04de542a
C
43 })
44 ],
901637bb
C
45 providers: [
46 PreloadSelectedModulesList
47 ],
693b1aba
C
48 exports: [ RouterModule ]
49})
50export class AppRoutingModule {}