From eca6fbc3246a7f3ee1f6a66b630aea0242664713 Mon Sep 17 00:00:00 2001 From: Johan Compagner Date: Mon, 11 Nov 2013 14:54:39 +0100 Subject: [PATCH] fix for style attribute not being copied to the dst object --- src/ng/compile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ng/compile.js b/src/ng/compile.js index 2e3d78677b52..f9687e20c445 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -1587,7 +1587,7 @@ function $CompileProvider($provide) { safeAddClass($element, value); dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value; } else if (key == 'style') { - $element.attr('style', $element.attr('style') + ';' + value); + dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value; // `dst` will never contain hasOwnProperty as DOM parser won't let it. // You will get an "InvalidCharacterError: DOM Exception 5" error if you // have an attribute like "has-own-property" or "data-has-own-property", etc.