From ce123dc4e746ae7bacd309196f841192e84a03a0 Mon Sep 17 00:00:00 2001 From: Mado Baker Date: Fri, 21 Sep 2018 19:28:58 -0400 Subject: [PATCH] fix(load): fire load event only when image is done loading (#200) closes #195 --- src/components/img-loader.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/img-loader.ts b/src/components/img-loader.ts index fdc1556..08a1aa9 100644 --- a/src/components/img-loader.ts +++ b/src/components/img-loader.ts @@ -227,7 +227,8 @@ export class ImgLoaderComponent implements OnInit { `url("${imageUrl || this.fallbackUrl}")`, ); } - - this.load.emit(this); + if(stopLoading) { + this.load.emit(this); + } } }