]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - client/src/app/app-routing.module.ts
update ng-bootstrap
[github/Chocobozzz/PeerTube.git] / client / src / app / app-routing.module.ts
... / ...
CommitLineData
1import { NgModule } from '@angular/core'
2import { RouterModule, Routes } from '@angular/router'
3
4import { PreloadSelectedModulesList } from './core'
5import { AppComponent } from '@app/app.component'
6
7const routes: Routes = [
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: 'verify-account',
18 loadChildren: './+verify-account/verify-account.module#VerifyAccountModule'
19 },
20 {
21 path: 'accounts',
22 loadChildren: './+accounts/accounts.module#AccountsModule'
23 },
24 {
25 path: 'video-channels',
26 loadChildren: './+video-channels/video-channels.module#VideoChannelsModule'
27 },
28 {
29 path: 'about',
30 loadChildren: './+about/about.module#AboutModule'
31 },
32 {
33 path: '',
34 component: AppComponent // Avoid 404, app component will redirect dynamically
35 },
36 {
37 path: '**',
38 loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule'
39 }
40]
41
42@NgModule({
43 imports: [
44 RouterModule.forRoot(routes, {
45 useHash: Boolean(history.pushState) === false,
46 preloadingStrategy: PreloadSelectedModulesList
47 })
48 ],
49 providers: [
50 PreloadSelectedModulesList
51 ],
52 exports: [ RouterModule ]
53})
54export class AppRoutingModule {}