diff --git a/src/app/app.config.ts b/src/app/app.config.ts index 0da19c9..b2d5971 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -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'; @@ -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 },