diff options
Diffstat (limited to 'client/src/app/app-routing.module.ts')
-rw-r--r-- | client/src/app/app-routing.module.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index cff37a7d6..db8888dba 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts | |||
@@ -1,8 +1,9 @@ | |||
1 | import { NgModule } from '@angular/core' | 1 | import { NgModule } from '@angular/core' |
2 | import { RouterModule, Routes } from '@angular/router' | 2 | import { RouteReuseStrategy, RouterModule, Routes } from '@angular/router' |
3 | 3 | ||
4 | import { PreloadSelectedModulesList } from './core' | 4 | import { PreloadSelectedModulesList } from './core' |
5 | import { AppComponent } from '@app/app.component' | 5 | import { AppComponent } from '@app/app.component' |
6 | import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy' | ||
6 | 7 | ||
7 | const routes: Routes = [ | 8 | const routes: Routes = [ |
8 | { | 9 | { |
@@ -43,12 +44,14 @@ const routes: Routes = [ | |||
43 | imports: [ | 44 | imports: [ |
44 | RouterModule.forRoot(routes, { | 45 | RouterModule.forRoot(routes, { |
45 | useHash: Boolean(history.pushState) === false, | 46 | useHash: Boolean(history.pushState) === false, |
47 | scrollPositionRestoration: 'disabled', | ||
46 | preloadingStrategy: PreloadSelectedModulesList, | 48 | preloadingStrategy: PreloadSelectedModulesList, |
47 | anchorScrolling: 'enabled' | 49 | anchorScrolling: 'disabled' |
48 | }) | 50 | }) |
49 | ], | 51 | ], |
50 | providers: [ | 52 | providers: [ |
51 | PreloadSelectedModulesList | 53 | PreloadSelectedModulesList, |
54 | { provide: RouteReuseStrategy, useClass: CustomReuseStrategy } | ||
52 | ], | 55 | ], |
53 | exports: [ RouterModule ] | 56 | exports: [ RouterModule ] |
54 | }) | 57 | }) |