Angular 9 animation - how to animate individual destruction of components without wrapping them in a new div?

127 views Asked by At

Is it necessary to wrap a component in an element (like div) that has @animation on itself in order to animate the destruction of that component? Here's what I tried so far: stackblitz

Basically, I want this:

<my-component @anim *ngIf="show" (click)="toggleShow()"></my-component>

instead of this:

<div @anim *ngIf="show">
    <my-component (click)="toggleShow()"></my-component>
</div>
0

There are 0 answers