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

27 lines
621 B
TypeScript
Raw Normal View History

import { NgModule } from '@angular/core'
2017-10-09 14:28:44 +02:00
import { Routes, RouterModule } from '@angular/router'
2018-03-01 13:57:29 +01:00
import { RedirectService } from '@app/core/routing/redirect.service'
2017-10-09 14:28:44 +02:00
import { PreloadSelectedModulesList } from './core'
2016-11-20 17:18:15 +01:00
const routes: Routes = [
2017-01-23 22:32:43 +01:00
{
path: 'admin',
2017-12-11 17:36:46 +01:00
loadChildren: './+admin/admin.module#AdminModule'
2016-11-20 17:18:15 +01: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 {}