Skip to content

Commit

Permalink
feat: use hash location
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelRauber committed Dec 21, 2023
1 parent cf22fbe commit 19a0cc0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { APP_INITIALIZER, ApplicationConfig } from '@angular/core';
import { provideRouter, withInMemoryScrolling } from '@angular/router';
import { provideRouter, withHashLocation, withInMemoryScrolling } from '@angular/router';
import { routes } from './app.routes';
import { flowbiteAppInitializer } from './flowbite';
import { provideAnimations } from '@angular/platform-browser/animations';
Expand All @@ -11,7 +11,11 @@ export const appConfig: ApplicationConfig = {
providers: [
{ provide: APP_INITIALIZER, useFactory: () => flowbiteAppInitializer, multi: true },
provideAnimations(),
provideRouter(routes, withInMemoryScrolling({ scrollPositionRestoration: 'top' })),
provideRouter(
routes,
withInMemoryScrolling({ scrollPositionRestoration: 'top' }),
withHashLocation(), // better compat with GitHub Pages
),
provideHttpClient(withFetch()),
CharacterTable,
{ provide: DATABASE_TABLE, useExisting: CharacterTable, multi: true },
Expand Down

0 comments on commit 19a0cc0

Please sign in to comment.