To create a smooth slide in and out animation, I have implemented the following code:
animations: [
trigger('assignState', [
state('maximize', style({
height: '*',
})),
state('minimize', style({
height: '0'
})),
transition('maximize => minimize', animate('300ms ease-in')),
transition('minimize => maximize', animate('300ms ease-out'))
])
]
In order for this animation to function correctly, I found that adding overflow: hidden
to the element is necessary. However, having overflow: hidden when the element is maximized causes issues with the content display. Some absolute elements within it are not visible due to the overflow hidden property.
Is there a way to automatically apply overflow hidden when the minimize state animation begins and remove it once the maximize animation has finished?
Thank you