added smooth page transitions
This commit is contained in:
1 parent
b8b5f52266
commit
293a06e9a4
3 files changed
+17
-4
No files matched your search
@@ -7,7 +7,9 @@
|
||||
<app-mobile-navbar></app-mobile-navbar>
|
||||
}
|
||||
}
|
||||
<router-outlet />
|
||||
|
||||
<router-outlet></router-outlet>
|
||||
|
||||
@if (showFooter) {
|
||||
<app-footer></app-footer>
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import {ApplicationConfig, importProvidersFrom, provideZoneChangeDetection} from '@angular/core';
|
||||
import {provideRouter} from '@angular/router';
|
||||
|
||||
import {provideRouter, withInMemoryScrolling, withViewTransitions} from '@angular/router';
|
||||
import {routes} from './app.routes';
|
||||
import {provideAnimationsAsync} from '@angular/platform-browser/animations/async';
|
||||
import {provideClientHydration, withEventReplay} from '@angular/platform-browser';
|
||||
@@ -17,7 +16,13 @@ export function createTranslateLoader(http: HttpClient) {
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
provideZoneChangeDetection({ eventCoalescing: true }),
|
||||
provideRouter(routes),
|
||||
provideRouter(routes,
|
||||
withViewTransitions(),
|
||||
withInMemoryScrolling({
|
||||
scrollPositionRestoration: 'top',
|
||||
anchorScrolling: 'enabled'
|
||||
})
|
||||
),
|
||||
provideAnimationsAsync(),
|
||||
provideClientHydration(withEventReplay()),
|
||||
provideHttpClient(),
|
||||
|
||||
Reference in new issue
Block a user