1
0
Fork 0
peertube/client/src/app/app-routing.module.ts

42 lines
968 B
TypeScript
Raw Normal View History

import { NgModule } from '@angular/core'
2018-03-19 09:24:12 +00:00
import { RouterModule, Routes } from '@angular/router'
2017-10-09 12:28:44 +00:00
import { PreloadSelectedModulesList } from './core'
2016-11-20 16:18:15 +00:00
const routes: Routes = [
2018-05-17 13:25:50 +00: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 09:35:01 +00:00
},
{
path: '**',
loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule'
2018-05-17 13:25:50 +00:00
}
]
2016-11-20 16:18:15 +00:00
@NgModule({
2017-09-06 19:48:15 +00:00
imports: [
RouterModule.forRoot(routes, {
useHash: Boolean(history.pushState) === false,
2017-10-09 12:28:44 +00:00
preloadingStrategy: PreloadSelectedModulesList
2017-09-06 19:48:15 +00:00
})
],
2018-03-01 12:57:29 +00:00
providers: [
PreloadSelectedModulesList
],
2016-11-20 16:18:15 +00:00
exports: [ RouterModule ]
})
export class AppRoutingModule {}