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>
|
<app-mobile-navbar></app-mobile-navbar>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<router-outlet />
|
|
||||||
|
<router-outlet></router-outlet>
|
||||||
|
|
||||||
@if (showFooter) {
|
@if (showFooter) {
|
||||||
<app-footer></app-footer>
|
<app-footer></app-footer>
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import {ApplicationConfig, importProvidersFrom, provideZoneChangeDetection} from '@angular/core';
|
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 {routes} from './app.routes';
|
||||||
import {provideAnimationsAsync} from '@angular/platform-browser/animations/async';
|
import {provideAnimationsAsync} from '@angular/platform-browser/animations/async';
|
||||||
import {provideClientHydration, withEventReplay} from '@angular/platform-browser';
|
import {provideClientHydration, withEventReplay} from '@angular/platform-browser';
|
||||||
@@ -17,7 +16,13 @@ export function createTranslateLoader(http: HttpClient) {
|
|||||||
export const appConfig: ApplicationConfig = {
|
export const appConfig: ApplicationConfig = {
|
||||||
providers: [
|
providers: [
|
||||||
provideZoneChangeDetection({ eventCoalescing: true }),
|
provideZoneChangeDetection({ eventCoalescing: true }),
|
||||||
provideRouter(routes),
|
provideRouter(routes,
|
||||||
|
withViewTransitions(),
|
||||||
|
withInMemoryScrolling({
|
||||||
|
scrollPositionRestoration: 'top',
|
||||||
|
anchorScrolling: 'enabled'
|
||||||
|
})
|
||||||
|
),
|
||||||
provideAnimationsAsync(),
|
provideAnimationsAsync(),
|
||||||
provideClientHydration(withEventReplay()),
|
provideClientHydration(withEventReplay()),
|
||||||
provideHttpClient(),
|
provideHttpClient(),
|
||||||
|
|||||||
@@ -11,3 +11,9 @@ body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: Roboto, "Helvetica Neue", sans-serif;
|
font-family: Roboto, "Helvetica Neue", sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::view-transition-old(root),
|
||||||
|
::view-transition-new(root) {
|
||||||
|
animation-duration: 220ms;
|
||||||
|
animation-timing-function: ease;
|
||||||
|
}
|
||||||
Reference in new issue
Block a user