PeerTube/client/src/app/app-routing.module.ts

46 lines
1.0 KiB
TypeScript
Raw Normal View History

import { NgModule } from '@angular/core'
2018-03-19 10:24:12 +01:00
import { RouterModule, Routes } from '@angular/router'
2017-10-09 14:28:44 +02:00
import { PreloadSelectedModulesList } from './core'
2016-11-20 17:18:15 +01:00
const routes: Routes = [
2018-05-17 15:25:50 +02:00
{
path: 'admin',
loadChildren: './+admin/admin.module#AdminModule'
},
{
path: 'my-account',
loadChildren: './+my-account/my-account.module#MyAccountModule'
},
{
path: 'accounts',
loadChildren: './+accounts/accounts.module#AccountsModule'
},
{
path: 'video-channels',
loadChildren: './+video-channels/video-channels.module#VideoChannelsModule'
2018-05-31 11:35:01 +02:00
},
2018-06-27 14:21:03 +02:00
{
path: 'about',
loadChildren: './+about/about.module#AboutModule'
},
2018-05-31 11:35:01 +02:00
{
path: '**',
loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule'
2018-05-17 15:25:50 +02:00
}
]
2016-11-20 17:18:15 +01:00
@NgModule({
2017-09-06 21:48:15 +02:00
imports: [
RouterModule.forRoot(routes, {
useHash: Boolean(history.pushState) === false,
2017-10-09 14:28:44 +02:00
preloadingStrategy: PreloadSelectedModulesList
2017-09-06 21:48:15 +02:00
})
],
2018-03-01 13:57:29 +01:00
providers: [
PreloadSelectedModulesList
],
2016-11-20 17:18:15 +01:00
exports: [ RouterModule ]
})
export class AppRoutingModule {}