Hi , Does angular “leave” animations only works with *ngIf ?? I am trying to implement animations to a card on dismissal (when user clicks on cancel button present on the card) with *ngFor . Don’t want to use *ngIf for this. How to achieve this??
which animation are you talking about?
I am talking about :leave animations in *ngFor. That’s not working for me.
It works any time the DOM element is removed. You don’t have to remove with
You might, for example, be doing an
<ion-item [@myRemoveAnim] *ngFor="item of items">...</ion-item> and in your TS if you do a
splice on some
this.items it will be removed from the DOM and will animate.