0
abarref created
Hi,
How can I modify rounterTransition.ts to disable the sliding animations? I would want to disable them here so it disables the animations globally for the entire app.
import { animate, state, style, transition, trigger } from '@angular/animations';
export function appModuleAnimation() {
return slideFromBottom();
}
export function accountModuleAnimation() {
return slideFromUp();
}
export function slideFromBottom() {
return trigger('routerTransition', [
state('void', style({ 'padding-top': '20px', opacity: '0' })),
state('*', style({ 'padding-top': '0px', opacity: '1' })),
transition(':enter', [
animate('0.33s ease-out', style({ opacity: '1', 'padding-top': '0px' }))
])
]);
}
export function slideFromUp() {
return trigger('routerTransition', [
state('void', style({ 'margin-top': '-10px', opacity: '0' })),
state('*', style({ 'margin-top': '0px', opacity: '1' })),
transition(':enter', [
animate('0.2s ease-out', style({ opacity: '1', 'margin-top': '0px' }))
])
]);
}
1 Answer(s)
-
0
Hi,
The best opiton is to search for
animations: [appModuleAnimation()]
and remove it from each component.