remove hash routing and enable anchor scrolling
This commit is contained in:
parent
9052990d99
commit
d31d69989a
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user