diff --git a/src/main.ts b/src/main.ts index 56918a4..91c4965 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,7 +3,6 @@ import { environment } from './environments/environment'; import { bootstrapApplication } from '@angular/platform-browser'; import { AppComponent } from './app/app.component'; import { APP_ROUTES } from './app/app.routes'; -import { LocationStrategy, HashLocationStrategy } from '@angular/common'; import { RouterModule } from '@angular/router'; import { provideAnimations } from '@angular/platform-browser/animations' import { HttpClientModule } from '@angular/common/http'; @@ -14,8 +13,10 @@ if (environment.production) { bootstrapApplication(AppComponent, { providers: [ - importProvidersFrom(RouterModule.forRoot(APP_ROUTES), HttpClientModule), - provideAnimations(), - { provide: LocationStrategy, useClass: HashLocationStrategy }, + importProvidersFrom(RouterModule.forRoot(APP_ROUTES, { + scrollPositionRestoration: 'enabled', + anchorScrolling: 'enabled' + }), HttpClientModule), + provideAnimations() ], }).catch((err) => console.error(err));