I want to trigger animation on button click
animations: [
trigger('simpleFadeAnimation', [
state('in', style({opacity: 1})),
transition(':enter', [
style({opacity: 0}),
animate(300 )
]),
transition(':leave',
animate(0, style({opacity: 0})))
])
],
Template
<div class="flex-align h-100" [@simpleFadeAnimation]>
<div class="description">{{ screens[currentIndex].title }}</div>
</div>
Now the animation is showing when the page loads, I want to show fadein animation each time "currentIndex" is changed