aboutsummaryrefslogtreecommitdiffstats
path: root/src/jqLite.js
diff options
context:
space:
mode:
authorIgor Minar2012-05-03 21:49:06 -0700
committerIgor Minar2012-05-03 23:40:43 -0700
commitb431ee38509724ba9098a7be7a8d6c5dcded4fe9 (patch)
tree5f0dc9efb902033be927c0acfaf38f67b9c740f7 /src/jqLite.js
parenta44d3dcd6a31f21de957855c732a28c881372549 (diff)
downloadangular.js-b431ee38509724ba9098a7be7a8d6c5dcded4fe9.tar.bz2
fix($compile): fix replaceWith
the old implementation didn't reattach jquery/jqlite data which caused things like to be lost I tried various implementations but it appears that by reattaching the data to the new node by copying the expando property is the most reliable of all.
Diffstat (limited to 'src/jqLite.js')
-rw-r--r--src/jqLite.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jqLite.js b/src/jqLite.js
index efe3ec31..02291932 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -75,7 +75,7 @@
*/
var jqCache = {},
- jqName = 'ng-' + new Date().getTime(),
+ jqName = JQLite.expando = 'ng-' + new Date().getTime(),
jqId = 1,
addEventListenerFn = (window.document.addEventListener
? function(element, type, fn) {element.addEventListener(type, fn, false);}