Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 55ad192

Browse files
jbedardpetebacondarwin
authored andcommitted
perf($compile): use static jquery data method to avoid creating new instances
1 parent 5b4713e commit 55ad192

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/compile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2525,7 +2525,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
25252525
// Copy over user data (that includes Angular's $scope etc.). Don't copy private
25262526
// data here because there's no public interface in jQuery to do that and copying over
25272527
// event listeners (which is the main use of private data) wouldn't work anyway.
2528-
jqLite(newNode).data(jqLite(firstElementToRemove).data());
2528+
jqLite.data(newNode, jqLite.data(firstElementToRemove));
25292529

25302530
// Remove data of the replaced element. We cannot just call .remove()
25312531
// on the element it since that would deallocate scope that is needed

0 commit comments

Comments
 (0)