From 226bc85c9057e5d1325c88d37e04d5684a1c6380 Mon Sep 17 00:00:00 2001 From: rickyroy44 Date: Mon, 7 Nov 2016 02:55:03 +0530 Subject: [PATCH] replacing append with html() append is causing issues when the text attribute is made dynamic with angular binding from controller. Multiple elements of dw-loading class gets added to DOM. So removing the element first and then appending it in update function. --- angular-loading.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angular-loading.js b/angular-loading.js index 87bbeb5..1202f8c 100644 --- a/angular-loading.js +++ b/angular-loading.js @@ -147,7 +147,7 @@ .text(options.text); body.append(text); } - + angular.element('.dw-loading').remove(); element.append(container); if ( options.active || !key || force) { @@ -247,4 +247,4 @@ return dst; } -})); \ No newline at end of file +}));