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'
17 path: 'verify-account',
18 loadChildren: './+verify-account/verify-account.module#VerifyAccountModule'
22 loadChildren: './+accounts/accounts.module#AccountsModule'
25 path: 'video-channels',
26 loadChildren: './+video-channels/video-channels.module#VideoChannelsModule'
30 loadChildren: './+about/about.module#AboutModule'
34 component: AppComponent // Avoid 404, app component will redirect dynamically
38 loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule'
44 RouterModule.forRoot(routes, {
45 useHash: Boolean(history.pushState) === false,
46 preloadingStrategy: PreloadSelectedModulesList,
47 anchorScrolling: 'enabled'
51 PreloadSelectedModulesList
53 exports: [ RouterModule ]
55 export class AppRoutingModule {}