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

29 lines
614 B
TypeScript
Raw Normal View History

import { NgModule } from '@angular/core'
2017-10-09 07:28:44 -05:00
import { Routes, RouterModule } from '@angular/router'
import { PreloadSelectedModulesList } from './core'
2016-11-20 10:18:15 -06:00
const routes: Routes = [
{
path: '',
2017-12-01 09:17:32 -06:00
redirectTo: '/videos/trending',
2016-11-20 10:18:15 -06:00
pathMatch: 'full'
2017-01-23 15:32:43 -06:00
},
{
path: 'admin',
loadChildren: './+admin#AdminModule'
2016-11-20 10:18:15 -06:00
}
]
2016-11-20 10:18:15 -06:00
@NgModule({
2017-09-06 14:48:15 -05:00
imports: [
RouterModule.forRoot(routes, {
useHash: Boolean(history.pushState) === false,
2017-10-09 07:28:44 -05:00
preloadingStrategy: PreloadSelectedModulesList
2017-09-06 14:48:15 -05:00
})
],
2017-10-09 07:28:44 -05:00
providers: [ PreloadSelectedModulesList ],
2016-11-20 10:18:15 -06:00
exports: [ RouterModule ]
})
export class AppRoutingModule {}