]>
Commit | Line | Data |
---|---|---|
df98563e | 1 | import { NgModule } from '@angular/core' |
ae5a3dd6 | 2 | import { RouterModule, Routes } from '@angular/router' |
a685e25c C |
3 | |
4 | import { PreloadSelectedModulesList } from './core' | |
b889cdb2 | 5 | import { AppComponent } from '@app/app.component' |
693b1aba C |
6 | |
7 | const routes: Routes = [ | |
4b4f22fc C |
8 | { |
9 | path: 'admin', | |
10 | loadChildren: './+admin/admin.module#AdminModule' | |
11 | }, | |
12 | { | |
13 | path: 'my-account', | |
14 | loadChildren: './+my-account/my-account.module#MyAccountModule' | |
15 | }, | |
d9eaee39 JM |
16 | { |
17 | path: 'verify-account', | |
18 | loadChildren: './+verify-account/verify-account.module#VerifyAccountModule' | |
19 | }, | |
4b4f22fc C |
20 | { |
21 | path: 'accounts', | |
22 | loadChildren: './+accounts/accounts.module#AccountsModule' | |
23 | }, | |
24 | { | |
25 | path: 'video-channels', | |
26 | loadChildren: './+video-channels/video-channels.module#VideoChannelsModule' | |
a51bad1a | 27 | }, |
78f912ed C |
28 | { |
29 | path: 'about', | |
30 | loadChildren: './+about/about.module#AboutModule' | |
31 | }, | |
b889cdb2 C |
32 | { |
33 | path: '', | |
34 | component: AppComponent // Avoid 404, app component will redirect dynamically | |
35 | }, | |
a51bad1a C |
36 | { |
37 | path: '**', | |
38 | loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule' | |
4b4f22fc | 39 | } |
df98563e | 40 | ] |
693b1aba C |
41 | |
42 | @NgModule({ | |
04de542a C |
43 | imports: [ |
44 | RouterModule.forRoot(routes, { | |
45 | useHash: Boolean(history.pushState) === false, | |
a685e25c | 46 | preloadingStrategy: PreloadSelectedModulesList |
04de542a C |
47 | }) |
48 | ], | |
901637bb C |
49 | providers: [ |
50 | PreloadSelectedModulesList | |
51 | ], | |
693b1aba C |
52 | exports: [ RouterModule ] |
53 | }) | |
54 | export class AppRoutingModule {} |