I am trying to stagger an animation in my app with a dynamic list. I would like to animation enter and leave if possible but would settle just to get the on enter to work.
animations: [
trigger('slideIn', [
transition(':enter', [
style({
transform: 'translate3d(0,-10px,0)',
opacity: 0
}),
animate('0.1s', style({
transform: 'translate3d(0,0,0)',
opacity: 1
}))
])
])
]
Above is the animation code that I cannot get to run and below is how I implemented it into the template.
<ion-content [@listAnimation]="eventsList?.length">
<ion-list>
<event-item *ngFor="let item of eventsList" [item]="item"></event-item>
</ion-list>
<empty-list [list]="eventsList" [message]="'There are no event items to display.'"></empty-list>
<ion-infinite-scroll [enabled]="infiniteScroll === null" (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
Please let me know where I have gone wrong.