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 { bootstrapApplication } from '@angular/platform-browser';
|
||||||
import { AppComponent } from './app/app.component';
|
import { AppComponent } from './app/app.component';
|
||||||
import { APP_ROUTES } from './app/app.routes';
|
import { APP_ROUTES } from './app/app.routes';
|
||||||
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
|
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
import { provideAnimations } from '@angular/platform-browser/animations'
|
import { provideAnimations } from '@angular/platform-browser/animations'
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
@ -14,8 +13,10 @@ if (environment.production) {
|
|||||||
|
|
||||||
bootstrapApplication(AppComponent, {
|
bootstrapApplication(AppComponent, {
|
||||||
providers: [
|
providers: [
|
||||||
importProvidersFrom(RouterModule.forRoot(APP_ROUTES), HttpClientModule),
|
importProvidersFrom(RouterModule.forRoot(APP_ROUTES, {
|
||||||
provideAnimations(),
|
scrollPositionRestoration: 'enabled',
|
||||||
{ provide: LocationStrategy, useClass: HashLocationStrategy },
|
anchorScrolling: 'enabled'
|
||||||
|
}), HttpClientModule),
|
||||||
|
provideAnimations()
|
||||||
],
|
],
|
||||||
}).catch((err) => console.error(err));
|
}).catch((err) => console.error(err));
|
||||||
|
Loading…
Reference in New Issue
Block a user