@Component({
template: `
<div class="snackbar-container"
(animationend)="animationDone($event)">
{{ content }} <button (click)="close()">✕</button>
</div>
`
})
export class SnackbarComponent {
..
@Output() afterClose = new EventEmitter();
animationDone(event: AnimationEvent) {
if (event.animationName === 'snackbarOut') {
this.afterClose.emit(true);
}
}
...
}