1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
4 import { PreloadSelectedModulesList } from './core'
5 import { AppComponent } from '@app/app.component'
7 const routes: Routes = [
10 loadChildren: './+admin/admin.module#AdminModule'
14 loadChildren: './+my-account/my-account.module#MyAccountModule'
18 loadChildren: './+accounts/accounts.module#AccountsModule'
21 path: 'video-channels',
22 loadChildren: './+video-channels/video-channels.module#VideoChannelsModule'
26 loadChildren: './+about/about.module#AboutModule'
30 component: AppComponent // Avoid 404, app component will redirect dynamically
34 loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule'
40 RouterModule.forRoot(routes, {
41 useHash: Boolean(history.pushState) === false,
42 preloadingStrategy: PreloadSelectedModulesList
46 PreloadSelectedModulesList
48 exports: [ RouterModule ]
50 export class AppRoutingModule {}