File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { ApplicationConfig , provideZoneChangeDetection } from '@angular/core' ;
2- import { provideRouter } from '@angular/router' ;
2+ import { provideRouter , withEnabledBlockingInitialNavigation , withInMemoryScrolling } from '@angular/router' ;
33
44import { routes } from './app.routes' ;
55import { provideHttpClient } from '@angular/common/http' ;
@@ -8,7 +8,14 @@ import { provideAnimations } from '@angular/platform-browser/animations';
88export const appConfig : ApplicationConfig = {
99 providers : [
1010 provideZoneChangeDetection ( { eventCoalescing : true } ) ,
11- provideRouter ( routes ) ,
11+ provideRouter (
12+ routes ,
13+ withEnabledBlockingInitialNavigation ( ) ,
14+ withInMemoryScrolling ( {
15+ scrollPositionRestoration : 'top' ,
16+ anchorScrolling : 'enabled' ,
17+ } ) ,
18+ ) ,
1219 provideHttpClient ( ) ,
1320 provideAnimations ( ) ,
1421 ] ,
You can’t perform that action at this time.
0 commit comments