i have a sub component like this
@Component({
selector: 'is-time-controlled',
templateUrl: './is-time-controlled.html',
styleUrls: ['./is-time-controlled.less'],
animations: [
trigger(
'myAnimation',
[
transition(
':enter', [
style({ transform: 'translateX(100%)', opacity: 0 }),
animate('500ms', style({ transform: 'translateX(0)', 'opacity': 1 }))
]
),
transition(
':leave', [
style({ transform: 'translateX(0)', opacity: 1 }),
animate('500ms', style({ transform: 'translateX(100%)', 'opacity': 0 }))
]
)
]
)
]
})
and the sub component has a template with first div like this
<div class="card card-padding" [@myAnimation]>
parent component has *ngIf
<is-time-controlled *ngIf="somelogic"> </is-time-controlled>
when logic is true i see enter animation but when logic becomes false i dont see leaving animation.
i see various opened issues. do we have a fix for this?