0

I was able to run animation in the application but I'm trying with no success to animate slide out, I've tried the following:

animations: [
        trigger('slideOut', [
            transition ('* => void', [
            animate('1000ms ease-out',
              style({ transform: 'translateY(200%)' })
            )
        ])

Nothing is moving. I need actually the height to be zero but this example is just not moving as well. This should be animate an info message from display to disappearing. Thanks.

user2304483
  • 1,462
  • 6
  • 28
  • 50

1 Answers1

0

When you are using * => void you are actually telling Angular to animate your component when it goes out of view. Do you remove your component from the view? You may try to *ngIf your component and when it goes out of view animation will trigger.

Check this StackBlitz showing how to use this animation.

wnvko
  • 1,985
  • 1
  • 14
  • 18