From 6b31ca3d06fca0012a9523cb35e0af0568b17f52 Mon Sep 17 00:00:00 2001 From: Dmytro Yarmak Date: Sat, 16 Jun 2018 14:54:05 +0300 Subject: [PATCH] fix(module:nz-alert): emit close after fade animation is done (#1667) close #1666 --- components/alert/nz-alert.component.html | 2 +- components/alert/nz-alert.component.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/components/alert/nz-alert.component.html b/components/alert/nz-alert.component.html index 56436b693f6..d2739b18968 100644 --- a/components/alert/nz-alert.component.html +++ b/components/alert/nz-alert.component.html @@ -1,4 +1,4 @@ -
+
diff --git a/components/alert/nz-alert.component.ts b/components/alert/nz-alert.component.ts index d2117f26853..87441479be2 100644 --- a/components/alert/nz-alert.component.ts +++ b/components/alert/nz-alert.component.ts @@ -126,7 +126,12 @@ export class NzAlertComponent implements OnInit { closeAlert(): void { this.display = false; - this.nzOnClose.emit(true); + } + + onFadeAnimationDone(): void { + if (!this.display) { + this.nzOnClose.emit(true); + } } updateOuterClassMap(): void {