This media is not supported in your browser
VIEW IN TELEGRAM
π Angular Animations Tutorial: Route Transitions
#angular #ui_element #provideRouter #provideAnimations
β Article link
π Code link
#angular #ui_element #provideRouter #provideAnimations
export const routeTransition = trigger(
'routeTransition', [
transition('* => *', [
query(':enter', [
style({
opacity: 0,
scale: 0.9
}),
], { optional: true }),
query(':leave', [
animate('0.2s', style({
opacity: 0,
scale: 0.9
}))
], { optional: true }),
query(':enter', [
animate('0.2s', style({
opacity: 1,
scale: 1
}))
], { optional: true })
])
])
<app-nav></app-nav>
<div
[@routeTransition]="data"
style="display: contents"
>
<router-outlet></router-outlet>
</div>
β Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
β€1π1