From b431ee38509724ba9098a7be7a8d6c5dcded4fe9 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 3 May 2012 21:49:06 -0700 Subject: 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. --- src/jqLite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/jqLite.js') 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);} -- cgit v1.2.3